0
votes

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?

1

1 Answers

0
votes

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.