0

My team is moving on project to to Azure DevOps. While the project is running correctly locally, it failed to build two of our Web Sites in DevOps

The error message:

##[error]MyProject\MyWebServices\web.config(59,0): Error ASPCONFIG: Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

The compiler command:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_compiler.exe -v /MyWebServices -p MyWebServices\ -u -f PrecompiledWeb\MyWebServices\

The Web.Config had the following line:

<compilation debug="true" targetFramework="4.5">
  <assemblies>
 <add assembly="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
  </assemblies>
</compilation>

I have read this post and this post and the solution provided are not working for me.It was not a type mismatched because I have tried both x84 and x64 compilation and they are both failing for me.

Any idea how to solve this problem?

AngryOtter
  • 149
  • 9

1 Answers1

0

If your project depends on build environment, we suggest that you use self-hosted agents, which give you more control to install dependent software needed for your builds and deployments. If the project is running correctly locally, you should get the same result using self-hosted agents which will build on your local machine.

In addition, if you prefer to use Microsoft-hosted agents, please make sure that it is the same build environment as your local machine. You can see the installed software for each hosted agent by choosing the Included Software link in the table.

BTW, you could set pipeline variable system.debug to true, and then queue a new build to get debug logs, so you can review it to get detailed build information. See: Troubleshoot pipeline runs for details.

Edward Han-MSFT
  • 2,879
  • 1
  • 4
  • 9
  • Does that mean that every dev in my team will need to havev self-hosted agents? – AngryOtter Apr 21 '21 at 12:45
  • If you have only one parallel job, so you just need to deploy one self-hosted agent, so each build can use it in turn. – Edward Han-MSFT Apr 22 '21 at 01:30
  • Hi AngryOtter, Does my answer work? Please check it and kindly let me know the result. – Edward Han-MSFT May 04 '21 at 06:25
  • Hi Edward, we ended up removed the library completely because we need to perform some hot fix patch publish so we did not end up using the self-host agent due to the cost of learning and the amount of time that was available to us. I will mark it as answer anyway. – AngryOtter May 04 '21 at 14:54