Last week, after upgrading a client from Team Foundation Server 2008 to 2010, I got following error after restoring the build configuration
TF270015: 'MSTest.exe' returned an unexpected exit code. Expected '0'; actual '1'
This error message causes the build to fail.I was able to pin down the issue to the following situation:
- You try to to build a VS 2008 solution and run associated tests from a .vsmdi file on a TFS 2010 Build machine.
- One or more of the unit tests specified in a test list in the VSMDI file fails.
The problem is that you end up with a build that "partially succeeds" when some unit tests fail, but these test results are not available in the build report. The moment all your tests succeed, the build succeeds also and all test results are published correctly. Unfortunately there is no solution yet, a bug is opened on MSConnect. So hopefully this will be solved in the next Service Pack.