Build failing - VS2010 solution on TFS2008

Posted by Nick on Stack Overflow See other posts from Stack Overflow or by Nick
Published on 2010-04-27T09:31:07Z Indexed on 2010/04/27 9:33 UTC
Read the original article Hit count: 798

I have migrated a VS2008 ASP.NET MVC solution to VS2010/MVC2/.NET 4.0 The solution builds locally and all unit tests pass.

Our TFS server is still TFS2008 and I am having problems getting the CI build to pass.

The projects all build successfully, the unit tests all run and pass but the Running Tests item fails.

I followed this blog post on how to get the build working and I'm almost there.

Combing the log file for failures I have found the following:

Test Run Completed.
Passed  1101
------------
Total   1101   
Results file:  C:\Documents and Settings\apptemetrybuild\Local Settings\Temp\Client Portal 3\CI\TestResults\apptemetrybuild_ATT15DEV01 2010-04-27 09_09_59_Any CPU_Release.trx
Test Settings: Default Test Settings
Waiting to publish...   
Publishing results of test run apptemetrybuild@ATT15DEV01 2010-04-27 09:09:59_Any CPU_Release to http://att15tfs01:8080/...
.....Publish completed successfully.   
Command:
D:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe /nologo /searchpathroot:"C:\Documents and Settings\apptemetrybuild\Local Settings\Temp\Client Portal 3\CI\Binaries\Release" /resultsfileroot:"C:\Documents and Settings\apptemetrybuild\Local Settings\Temp\Client Portal 3\CI\TestResults" /testcontainer:"C:\Documents and Settings\apptemetrybuild\Local Settings\Temp\Client Portal 3\CI\Binaries\Release\\Attenda.Stargate.Security.Tests.dll" /publish:"http://att15tfs01:8080/" /publishbuild:"vstfs:///Build/Build/149" /teamproject:"Client Portal 3" /platform:"Any CPU" /flavor:"Release"
The "TestToolsTask" task is using "MSTest.exe" from "D:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe".   
Loading C:\Documents and Settings\apptemetrybuild\Local Settings\Temp\Client Portal 3\CI\Binaries\Release\\Attenda.Stargate.Security.Tests.dll... 
C:\Documents and Settings\apptemetrybuild\Local Settings\Temp\Client Portal 3\CI\Binaries\Release\\Attenda.Stargate.Security.Tests.dll 
Could not load file or assembly 'file:///C:\Documents and Settings\apptemetrybuild\Local Settings\Temp\Client Portal 3\CI\Binaries\Release\Attenda.Stargate.Security.Tests.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. MSBUILD : warning MSB6006: "MSTest.exe" exited with code 1. [C:\Documents and Settings\apptemetrybuild\Local Settings\Temp\Client Portal 3\CI\BuildType\TFSBuild.proj]   
The previous error was converted to a warning because the task was called with ContinueOnError=true.   
Build continuing because "ContinueOnError" on the task "TestToolsTask" is set to "true". 
Done executing task "TestToolsTask" -- FAILED.

It looks like it's trying to use the 2008 MSTest tool even though I have specified ToolsVersion="4.0" in the tfsbuild.proj and changed the MSBuildPath in the TfsBuildService.exe.config on the build server.

Can anyone point me in the right direction to get this to build successfully?

Many thanks, Nick

© Stack Overflow or respective owner

Related posts about visual-studio-2010

Related posts about tfs2010