Visual Studio Online Hosted Build Controller Cannot find Microsoft.WindowsAzure.Diagnostics assembly

we use the VSO build controller to run our CI builds. Build failure does not work.

C: \ Program Files (x86) \ MSBuild \ 12.0 \ bin \ amd64 \ Microsoft.Common.CurrentVersion.targets (1697): This link could not be resolved. The assembly "Microsoft.WindowsAzure.Diagnostics, Version = 2.4.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35, processorArchitecture = MSIL" could not be found. Make sure the assembly exists on disk. If this link is required for your code, you may get compilation errors.

This build must be enabled for the Azure SDK, which must be included in the host according to http://listofsoftwareontfshostedbuildserver.azurewebsites.net/ , although http://www.visualstudio.com/en-us/get-started/hosted- build-controller-vs.aspx claims that the host only supports up to 2.3. We had this building, though.

All of our Azure SDK builds are for version 2.4. It is created locally and there are no previous versions of the SDK on my machine. We have mandatory redirects so ...

<dependentAssembly> <assemblyIdentity name="Microsoft.WindowsAzure.Diagnostics" publicKeyToken="31BF3856AD364E35" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-2.4.0.0" newVersion="2.4.0.0" /> </dependentAssembly> 

Has anyone else seen this?

+5
source share
4 answers

You can fix this by setting the "Specific Version" property in your Microsoft.WindowsAzure.Diagnostics link in the affected project using Visual Studio (right-click the link and select "Properties in Solution Explorer"). This will force the build server to use version 2.3.

If you use any new classes or methods in the SDK 2.4, this may not work, but at least gives you a workaround until MS fixes the problem.

Here is an image of my working link

Specific Version Reference for Azure Diagnostics Assembly

Finally, look at the link (really old) for more information on the specific link version: http://www.codemag.com/article/0507041 ,

+2
source

I began to experience the same thing today. Not sure what has changed. After that, https://connect.microsoft.com/VisualStudio/feedback/details/1007907/error-deploying-to-azure-sdk-2-4 was raised

What I did to overcome this problem was that I created an old-style lib folder and added diagnostics and a DLL to it. I change my csproj to a link from there. And that seems to have fixed it.

+1
source

Bug fixed. A workaround is no longer required to use the Azure SDK 2.4.

+1
source

I added a powershell script file to print all the libraries on the build server. A complete reference on this subject can be found here . script consists of the following line

 gp HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* 

The printed list did not include Windows Azure libraries for .NET - version 2.4, all other versions are available. This was raised as an active bug on connect.microsoft .

Until this is fixed, adding libraries 2.4 to the source or reverting to an earlier version of azure will be the only work.

0
source

Source: https://habr.com/ru/post/1205247/


All Articles