Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I find a three step elimination is useful:</p> <ol> <li><p>Do the tests run in Visual Studio dev environment?</p></li> <li><p>Do the tests run in msbuild locally?</p></li> <li><p>Do the tests run in msbuild on the build server?</p></li> </ol> <p>I use the build.cmd script below to run msbuild on my local machine in an environment that very closely matches what will be used by the TFS build server.</p> <h2>build.cmd script</h2> <pre><code>@setlocal SET MSBUILDVER=v4.0.30319 SET MSBUILDEXE=%FrameworkDir%%MSBUILDVER%\MSBuild.exe SET builduri=local %MSBUILDEXE% BuildDefinitions\TFSBuild.proj %* </code></pre> <p>NOTE: This script must be run from a Visual Studio 2010 command prompt window:</p> <p>Start -> All Programs -> Microsoft Visual Studio 2010 -> Visual Studio Tools -> Visual Studio Command Prompt (2010)</p> <p>In general, setting the true in TFSBuild.proj should cause unit tests to run automatically in any solutions listed in the build, but it sounds like that is not working for you?</p> <p>What happens if you pass command line option /p:RunTest=true to msbuild from command shell?</p> <p>You should be able to add custom TFS build command line options to the server build through the TFSBuild.rsp file if necessary, but should not really be necessary for RunTest.</p> <p>TFS build server should automatically create a .trx results file -- check the build results through Build Explorer in Visual Studio -- the View Test Results will open the .trx file in VS.</p> <p>Not sure about solutions to your other specific problems, but i would try running the build in a command window locally to get a clearer view of what is happening during the build. Error messages will show up as red text, warning messages as yellow text, and lots of other intermediate build step info as grey text.</p> <p>There are lots of good blog posts around about TFS build subjects -- Aaron Hallberg's blog (blogs.msdn.com/b/aaronhallberg) would be a good place to start. Also, MSDN has lots of good info on TFS / MS Build - for example: <a href="http://msdn.microsoft.com/en-us/library/ms181721(v=VS.90).aspx" rel="nofollow noreferrer">Running Builds in Team Foundation Build </a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload