Strange MSTest.exe problems with Build Server 2008 RTM
I've created a pretty basic build definition that fires whenever a check-in occurs. When the build server attempts to execute the unit tests, MSTest.exe fails with the following logged output:
Using "TestToolsTask" task from assembly "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\Microsoft.VisualStudio.QualityTools.MSBuildTasks.dll".
Task "TestToolsTask"
Command:
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe /nologo /searchpathroot:"C:\Documents and Settings\NALDENTFSSERVICE\Local Settings\Temp\Test\Build After Check-in\Binaries\Release" /resultsfileroot:"C:\Documents and Settings\NALDENTFSSERVICE\Local Settings\Temp\Test\Build After Check-in\TestResults" /testmetadata:"C:\Documents and Settings\NALDENTFSSERVICE\Local Settings\Temp\Test\Build After Check-in\Sources\Product1.vsmdi" /testlist:"All Tests" /publish:"http://nalden-tfs:8080/" /publishbuild:"Build After Check-in_20080116.1" /teamproject:"Test" /platform:"Any CPU" /flavor:"Release"
The "TestToolsTask" task is using "MSTest.exe" from "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe".
Invalid switch "/publish".
Invalid switch "/publishbuild".
Invalid switch "/teamproject".
Invalid switch "/platform".
Invalid switch "/flavor".
For switch syntax, type "MSTest /help"
MSBUILD : warning MSB6006: "MSTest.exe" exited with code 1.
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.What's up with all the invalid switches? I performed a MSTest.exe /? at the command line and it does not appear to support the switches the TestToolsTask is generating.
How can I fix this problem?
Answers
What version of Visual Studio 2008 are you using on the Server? Although Unit testing comes with the 2008 Professional Edition, that does not work with Team Build. You would need Visual Studio 2008 for Software Testers or Visual Studio 2008 Team Suite. As a test, try downloading and installing the Team Suite from http://www.microsoft.com/downloads/details.aspx?FamilyId=D95598D7-AA6E-4F24-82E3-81570C5384CB&displaylang=en. You should'nt have to unstall your current version to install the Suite.
All Replies
- Same issue here. It happens to a Windows Server 2003 box with Team Explorer installed. But all the optional switches are there on a Window XP SP2 box. Not sure if the OS makes any difference.
Looking for a solution. What version of Visual Studio 2008 are you using on the Server? Although Unit testing comes with the 2008 Professional Edition, that does not work with Team Build. You would need Visual Studio 2008 for Software Testers or Visual Studio 2008 Team Suite. As a test, try downloading and installing the Team Suite from http://www.microsoft.com/downloads/details.aspx?FamilyId=D95598D7-AA6E-4F24-82E3-81570C5384CB&displaylang=en. You should'nt have to unstall your current version to install the Suite.
And I suppose all this extra software I'm having to install just to perform CruseControl.NET-like functions (build with unit testing) has to be licensed? It's very unfortunate if so. Build server should not require Visual Studio be installed at all. Team build should work out-of-the-box IMO. Hopefully this will be addressed in v3.
We are indeed hoping to address this issue in a future release, but for now running unit tests with Team Build does require VS Team Suite or VS Team Tester on the build machine.
-Aaron
- I am using TFS with Visual Studio Professional Edition and everything works fine except this part that we are talking about here. I can write code, write unit tests (I have written hundreds) and I can configuration CI using TFS. But now I have to spend $5,000 just to be able to run those same tests as part of my CI process? Are you sure that I can't just install the Professional Edition on the build server?
Do I really have to spend $5,000 to make this work?
Can we get some kind of status update on if this issue is resolved in 2010? - Hey Aaron
Which features of VS should be installed?
And does it have to be installed on the C drive?
(I don't have a lot of disk space left, hence my question) Well, this is an old post but this question remains unanswered. The release of TFS 2010 is forthcoming and I´m need to know if this is solved. If not, my option is to switch to subversion and CruiseControl.NET.
My humble opinion is that locking funktionality that unquestionably belongs to the CI server to the IDE version is a low-water mark in terms of licens obtruding.- That's a big switch.
in my opinion it's not that big a deal. Especially since you dont need a seperate licence for it.
The only reason I'm concerned it because of the space I have on the server. But I do still want to use al the other integrated features I don't get out-of-the box when I start using other tooling
Greetz.


