Azure 2.6 SDK - Microsoft.WindowsAzure.targets not found on TFS Online - azure

According to https://www.visualstudio.com/en-us/get-started/build/hosted-build-controller-vs
and
https://twitter.com/tfsbuck/status/595263582327025665
the tfs online build services should be updated. I just upgraded projects to 2.6 and checked them in to get the following:
The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Windows Azure Tools\2.6\Microsoft.WindowsAzure.targets" was not found.
Have something changed with 2.6 or is it because my build service not yet has been updated?

The VSO Host Build Controller has now been updated with Azure SDK 2.6.
You can see all the supported software here.

Related

How can I fix deployment problem? upgraded entity framework core from 3.1.4 to 3.1.5. Result mvc core web app runs in VS, but fails in Azure

How can I fix deployment problem? upgraded entity framework core from 3.1.4 to 3.1.5. Result mvc core web app runs in VS, but fails in Azure.
Dot Net core 3.1 with EF 3.1.4 in Azure ran OK.
I updated the Nuget EF packages to current stable 3.1.5, and the result runs locally, but fails when deployed to Azure with message:
"could not load file or assembly 'Microsoft.EntityFrameworkCore, Version=3.1.5.0"
I used the Azure AppService Console and can see the EF versions have the same date as my local files "5/1/2020".
The FileExplorer details screen shows the version as 3.1.5, while the error message says it can not load 3.1.5.0. I searched, but did not find any other people with this problem.
I think is missing the reference there. If you can, check in the folder "packages" if there is a EF 3.1.5 there. Also, check if there is some places which is showing just 3.1.5.0 and try to change to 3.1.5 as is showing in the nuget library.
Finally solved the problem. It involved information from this Microsoft article:
https://learn.microsoft.com/en-us/aspnet/core/test/troubleshoot-azure-iis?view=aspnetcore-3.1#clear-package-caches
Needed to uninstall some nuget packages, use command line nuget commands to clear nuget cache, and then re-install latest nuget packages. Redeployed to Azure and the site works again.

How do I upgrade an existing Cloud Service Project to use Azure SDK 3.0?

I'm migrating from VS2015 to VS2017, and updating a repo's solutions to be able to be compatible with VS2017. In the process, I'm also updating the Azure SDK version from 2.7 to 3.0.
I'm setting up a fresh dev environment, and installed Azure SDK 3.0 via VS2017's Azure development workload.
When I opened the solution file in the repo, I got one notice per cloud service project that its Microsoft Azure Tools version was getting upgraded from 2.7 to 2.9...
...and the ProductVersion tag in the corresponding .csproj files was updated from 2.7 to 2.9.
Questions:
Why wasn't this updated to 3.0?
Is there anyway for me to update it
to 3.0 without manually editing the csproj file? I don't see an
option to do so in Properties when I right click the cloud service
projects in Solution Explorer.
Is there some reason I shouldn't be
doing this?
"Microsoft Azure Tools - v2.9" mentioned in your screenshot is just a little misleading.
Underlying reason is that Microsoft hasn't really changed the version number of most components as part of 3.0 SDK release. Even the binaries get installed in the same folder as 2.9.
Good news is that you don't need to do anything special apart from converting the project to target latest version, which you're already getting prompted for.
So once you do convert your project as per the prompt, you're essentially working with SDK 3.0, even though version string says v2.9, because as the links explain, most of the components haven't changed major version number as part of SDK 3.0 version (when comparing with 2.9)
Here are some of the links which talk about this -
Azure SDK for .NET 3.0 Release Summary
No breaking changes to the Azure SDK 3.0 have been introduced in this
release. There is also no upgrade process needed to leverage this SDK
with existing Cloud Service projects. To allow use of the Azure SDK
3.0 without requiring an upgrade process, Azure SDK 3.0 installs to the same directories as Azure SDK 2.9. Most the components did not
change the major version from 2.9 but instead just updated the build
number.
Visual Studio 2017 latest installer does not install Azure SDK 3.0
In this link look at the response from Devin Breshears - MSFT
Azure 3.0 SDK Install Weirdness
An independent blog talking about the same issue.

Hosted build on VSO with Azure SDK 2.8 fails

We recently updated our Azure SDK to 2.8.
Now when building our solution on VSO hosted build we get build errors.
The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Windows Azure Tools\
2.8\Microsoft.WindowsAzure.targets" was not found.
Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
I've found another one with similar issues with a question posted on MSDN but without any answers. Support for Azure SDK 2.8 in hosted build
Anyone know how to get around this issue? Do we have to downgrade?
We are working on the update now. Azure 2.8 should be on the build machines week of Nov. 30.
Update: We ran into a couple of issues and still hope to have this completed this week, but it may slip into next week.
Update Dec. 17: We finally got the updated image with Azure 2.8 into production yesterday. Sorry for the long delay.
The latest Azure SDK supported on Hosted build is 2.7. Refer to Hosted build controller for details.
To build your solution, you'd either downgrade Azure SDK version to 2.7 or deploy your own build agent and install Azure SDK 2.8 on it.

Azure continuous deployment error Could not load file or assembly Microsoft.WindowsAzure.Packaging

Out of nowhere I started getting this error when I try to deploy my project to cloud service (using continuous deployment and hosted build controller.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Windows Azure Tools\2.5\Microsoft.WindowsAzure.targets (2917): Could not load file or assembly 'Microsoft.WindowsAzure.Packaging, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
I found this SO question, but it didn't help me.
Also I noticed I didn't even have folder:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\
I only have v10.0, v11.0, v12.0, so I manually created v14.0 and copied folder Windows Azure Tools form v12.0 but it didn't help.
EDIT
I've updated Azure tools to 2.6 but the problem and error message remains the same.
How can I fix this ?
I had the same error occurring today on Visual Studio Online's Host Build Controller. I assume you are using the same thing by your talk of Azure & Continuous Integration.
I noticed that they just released Azure SDK 2.6 support on the build controller in the last day or so. I feel that this may have somehow caused the problem.
I updated my cloud project to use 2.6, checked in, and everything was fine again. Some ccproj details:
<PropertyGroup>
<VisualStudioVersion Condition=" '$(VisualStudioVersion)' == '' ">10.0</VisualStudioVersion>
<CloudExtensionsDir Condition=" '$(CloudExtensionsDir)' == '' ">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Windows Azure Tools\2.6\</CloudExtensionsDir>
</PropertyGroup>
do you updated your Azure SDK for .NET to 2.5.1?
I have experienced this issue before when I updated the Azure SDK for .NET to 2.5.1
Microsoft has just recently release Azure SDK for .NET version 2.6 and I suggest you should try this. I believe this should solve your problem.
"try adding /p:GenerateBuildInfoConfigFile=false to your msbuild arguments in addition to /p:VisualStudioVersion=12.0, that has helped others workaround that same issue."
from here: https://social.msdn.microsoft.com/Forums/en-US/fc434580-cf81-44eb-9382-cd1b9fc9583a/microsoft-azure-sdk-v26-issue-with-cloud-builds?forum=TFService
Update Azure SDK to version 2.6 and after, update your Azure project's Application.
You can do this within the project's properties, by clicking the button to update Microsoft Azure Tools version from 2.5.1 to 2.6.

Type or namespace name 'Diagnostics' does not exist in the namespace 'Microsoft.WindowsAzure'

I'm working with a pre-existing codebase from a software developer that has left my company. I've downloaded the source code from the repository. When I attempt to build the project, I get an error that says:
The type or namespace name 'Diagnostics' does not exist in the namespace 'Microsoft.WindowsAzure' (are you missing an assembly reference?)
I can't figure out how to get this project up-and-running. When I look at the NuGet packages associated with the project, I can see that the Windows Azure Configuration Manager and Windows Azure Storage packages are already installed. I'm not sure what I'm missing though.
Can someone tell me what I need to install on my machine to get past this error? Thanks!
I recently had this error. The problem was that the project was referencing Framework 3.5 and I have the 2.4 SDK installed which targets 4.0. Upgrade your project to target 4.0 and you should be fine.
I was getting this error on Visual Studio 2015 Update 3. This project's Azure Tools verion is 2.9.
I resolved this error by right clicking References under the project that has the error, then clicking Add Reference, then click Extensions under Assemblies. Find Microsoft.WindowsAzure.Diagnostics, check the box, and click OK. Now try rebuilding your project and hope for a different error.
The assembly should exist on your computer here: C:\Program Files\Microsoft SDKs\Azure.NET SDK\v2.9\bin\plugins\Diagnostics\Microsoft.WindowsAzure.Diagnostics.dll
If you do not see this assembly, it's most likely because you do not have the required Azure SDK. If you are using Azure SDK v2.9 like I am, you can download the SDKs here: Microsoft Azure SDK for .NET - 2.9
Then click download and select:
MicrosoftAzureLibsForNet-x64.msi (Microsoft Azure Client Libraries for .NET)
MicrosoftAzureTools.VS.140 (Microsoft Azure Tools for Microsoft Visual Studio 2015)
If you are using Azure SDK v2.7 then you will want to use this link: Microsoft Azure SDK for .NET - 2.7

Resources