Azure Cloud Service error when deploying against v4.6.1 - azure

I am having a new issue when deploying Azure Cloud Services via Visual Studio 2015 SP1.
This is driving me up the wall and I am curious if anybody else has seen this? Basically, I can build just fine, I just can't package for or publish to a Cloud Service - the error is:
CloudServices232: The role MyProject.AsyncWorker is using an unsupported TargetFrameworkVersion v4.6.1.
This wasn't happen a few weeks ago, but now I can't publish it. Yes I am targeting .NET 4.6.1 - but that has been WORKING JUST FINE for a while now and I followed all the steps to run install.cmd and manually deploy it.
This appears to be a new build-time error (it used to be a warning).

Related

Exception during publishing web app to Azure

We have created a sample Asp.net Core application. When we tried to publish the application into Azure we got following exception.
Web deployment task failed. (The type initializer for 'Microsoft.Web.Deployment.DeploymentManager' threw an exception.)
We have tried some solutions posted in some blogs but none got the issue resolved.
Here are some ways you could try:
1.Look for a key in the registry under the following paths that points the the problem assembly and delete it:
HKLM\Software\Microsoft\IIS Extensions\msdeploy\3\extensibility
HKLM\Software\Wow6432Node\Microsoft\IIS Extensions\msdeploy\3\extensibility
The problem registry key is installed by SQL.
2.Reinstall Web Deploy 3.5.
3.Uninstall dbsqlpackage provider . this packages no longer support.
4.Restarted Visual Studio and rebuilt the project.
For more details, you could refer to this thread.
It sounds like you are trying to create a web job and publish it to a App Service in Azure. To do this you have to create a Azure WebJob project type in visual studio. To get this project type in VS you have to install it or download it using nuget.
Installing "Web Deploy 3.5" extension helped me solve this issue.
https://www.iis.net/downloads/microsoft/web-deploy

Azure Project Error - Output Type in Project Settings

I am working on Azure application. After I have updated my Visual Studio 2017 to the latest release, the Azure Function Apps started throwing error while running. Following is the error I am facing -
A project with an Output type of Class Library cannot be started directly.
Earlier, the application was running fine. I have tried uninstalling the VS2017 but still no luck. Has anybody faced similar issue? Please note, this is running perfectly on my colleague's machine, not sure why I am facing this error.
The real answer is in a comment by brettsam, so I'll restate it here because I almost missed it:
You don't need to downgrade. You need Azure Functions and Web Jobs installed.
You can get it through the Visual Studio Installer under the "ASP.NET and web development" package. I think it should be under "Cloud tools for web development" but I went ahead and installed both the "ASP.NET and web development" and the "Azure development" packages.
I fixed the above issue by downgrading the version of Microsoft.Net.Sdk.Functions to 1.0.8. Earlier, it was 1.0.9, when I downgraded, it started working fine.

Error when releasing from VSTS to Azure Web App

I have created a simple release definition in VSTS that takes a built .net core web app and pushes the build out to an Azure Web App. Unfortunately this fails on the last step with the error:
##[error]Error: Offset is out of bounds
Does anyone know what might cause this?
This was caused by a couple of issues:
1) I was using the .net core build task which required I supply a path to the .csproj, it couldn't find my .csproj. I switched it to the command line task instead and this then fixed that issue.
2) The other issue was that I was using the wrong hosted build agent. When I switched to the VS2017 build agent it all worked.

The Windows Azure SDK for .NET must be installed

I'm trying to publish my app to Azure which I have done several times before. For some reason I'm now getting the following error:
The Windows Azure SDK for .Net must be installed to enable publishing
to Windows Azure. LightSwitch will load a web page to begin
installation.
It loads a web page, downloads V11AzurePack_1_8_1.exe which in turn runs the Web Platform Installer 4.6 which in turn installs Windows Azure SDK Tools 1.8.1 for Visual Studio 2012. All of this succeeds. But going back and attempting to Publish results in the same error.
I noticed that there is a Windows Azure SDK for .Net (VS 2012) - 2.2 in the WPI. So I installed that manually, tried to publish, same result.
The SDK is clearly installed:
So why can't I publish to Azure? The only thing that looks like it might be a problem is that I have LightSwtich Azure Publishing 1.1 add-on for Visual Studio 2012 installed and I know there is a newer version of that available. But I can't find a direct download nor can I find a way to uninstall that package or force WPI to suggest an update.
Uninstalling everything Azure related (except the LightSwitch add-on as that seems to be unremovable and un-upgradeable), rebooting, and installing only the latest SDK produces the same problem.
After following a moderator's advice to repair Visual Studio on the forum, I was no longer able to open my project at all. I waited for a response but got none. So I decided to reinstall Visual Studio all together.
I followed this and this in order to remove as much of Visual Studio as possible and then reinstalled. I then installed Update 4 and was again able to open my project.
However, upon trying to publish, the same error was encountered.
I decided to upgrade my project to VS2013. That all seemed to go well. Wnet o Publish to Azure and it claimed that it succeeded. However going to Azure and launching the app's site brought up the previous version.
I deleted my Azure cloud service and started a new project in VS2013. I copied over one of my screens to have something to run. I then tried to publish to Azure. It again told me it succeeded but the site did not exist in the Azure Management portal. However, it did realize that I had created a new self-signed certificate so there was some type of communication there. Just not an actual Publish.
Then I did something really stupid. I uninstalled the Azure SDK and tried to reinstall it thinking that was the problem. Now I'm back to where I was before. An endless loop asking me to install the Azure SDK.
I wiped out all of my Azure services. Did a system restore to a month ago. Reinstalled the Azure SDK. This then allowed me to "Publish".
Not really.
Visual Studio claimed that the Publish Succeeded. The services were created and the certificate uploaded but nothing was deployed. I then did a manual deploy and the Production instance began to be deployed.
Everything seems to be running but I cannot access my app's site. I receive a 403 Forbidden error message. With or without HTTPS required. But this seems to be a different issue so I'm going to open another question on it.
Why these extreme measures were required is beyond me. This continual breaking of LightSwitch to Azure publishing is getting to be absurd though.

There was an error attaching the debugger to the IIS worker process

I am new to Azure. I am trying to start my application in VS2012 (debugging). I am getting the error below:
There was an error attaching the debugger to the IIS worker process for URL 'http://learning.cloudapp.net:82' for role instance 'deployment18(13)......'. Unable to start debugging on the web server. The underlying connection was closed: An unexpected error occurred on a receive.
My application is working fine when I hosted it in IIS. It worked fine when I set the website project as the start up project. But when I set the azure project as start up project and start debugging I am getting the error. I have tried almost everything I could find on the internet. Can anyone please help?
Thanks,
Mahesh
One time I got this by loading an older Azure solution on a newer machine, another time after I upgraded to Azure SDK 2.0.
I was using IIS Express instead of regular IIS.
Each time the only thing that fixed was:
Install Azure SDK 2 via Web Platform Installer
Install Azure Powershell tools via Web Platform Installer
Create a new Azure Project -- do not use your old azure cloud project. Do not try to get it to work-- start fresh.
Foreach web/worker role that you use to have in your previous azure projects, create new web/worker roles for those as well. Do not try to get the old ones to work-- start fresh. Copy the content/files from your old ones into the new projects.
So basically, install the latest tools and then create new assemblies/packages/projects to replace the old ones.

Resources