Azure DevOps, Scrum, & .NET Software Leadership and Consulting Services

How to run an MSBuild "Desktop Build" without running tests.

I’ve been playing around with doing “desktop builds” with MSBuild.  A “desktop build” is where you’d take the build script that describes a Team Foundation Server Team Build and run it on your local machine instead of through the TFS Build Server. 

There’s a page on the MSDN site that tells you how to do this and gives you some suggestions for common command-line options for MSBuild.  One of them is running your team build script without running the unit tests.  The syntax they provide is “msbuild TfsBuild.proj /t:RunTest=false“. 

I tried it and got the following error:

C:codeTeamBuildTypesMyProjectTFSBuild.proj : error MSB4057: The target “RunTest=false” does not exist in the project.
0 Warning(s)
1 Error(s)

There’s a bug in the documentation.  It should say “msbuild TfsBuild.proj /p:RunTest=false“ — /p instead of /t.



Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.