If you try to build an “old” Visual Studio 2008 solution with the new Team Foundation Server 2010 and after the build you try to execute automatic unit test project inserting the following directive inside your build project:
<MetaDataFile Include="$(BuildProjectFolderPath)/<your vsmdi file>.vsmdi"> <TestList>yourtestproject.UnitTest</TestList> <MetaDataFile>
your build probably will fail with the following nice error:
TF270015: 'MSTest.exe' returned an unexpected exit code. Expected '0'; actual '1'.
After a Google search (see references below) I’ve found that the problem could be due to the fact that TFS 2010 can only build test project written in .NET 4.0.
For now there’s no fix available to resolve this problem (as you can see here) and there’s no timing about a Microsoft hotfix (QFE) release.
References:
- http://social.msdn.microsoft.com/Forums/en-US/tfsbuild/thread/1c67aa6b-b628-42d6-bd7a-9e42f2e4afad
- http://stackoverflow.com/questions/2476200/tfs-2010-rc-does-not-run-visual-studio-2008-mstest-unit-tests
- http://matthewrowan.spaces.live.com/Blog/cns!CCB05A30BCA0FF01!4952.entry