Troubleshooting Team Foundation Build Tests
The following sections describe common troubleshooting scenarios you may experience when configuring Team Foundation Build tests.
Log File Errors
When you run static analysis with Team Foundation Build, one or both of the following errors may be recorded in the log file:
In order to perform Code Analysis on managed binaries, MSBuild must start FxCop. MSBuild cannot locate the FxCop binaries. Make sure Visual Studio Team Edition for Developers or Visual Studio Team System is installed and run MSBuild from the "Visual Studio Command Prompt" or specify the path of FxCop by setting the FXCOPDIR environment variable."
MSBUILD : warning : Visual Studio Team Edition for Developers or Visual Studio Team Edition for Developers is required to run tests as part of a Team Foundation Build.
The previous error was converted to a warning because the task was called by using ContinueOnError=true.
Build continuing because "ContinueOnError" on the task "TestToolsTask" is set to "true".
Done building target "RunTestWithConfiguration" in project "TFSBuild.proj".
Install Visual Studio Team Edition for Developers to run unit tests, static analysis tools, or code coverage. If you must also include Web and load tests, then install Visual Studio Team Edition for Testers instead.
MSBUILD: warning : Specified cast is not valid
Make sure that you do not have an empty test list or subtest list included in the build process. If you have empty lists, edit the tfsbuild.proj file to remove them.
No Test Cases to Run
Make sure that at least one test list is included in the build and that each test list includes at least one test.
Publish Operation Fails
Make sure that the Team Foundation Service Account has Full control permission access to the publish drop and that the drop location is a shared folder.
Files Added to the Config File Are Not Copied to the Build
If you add extra text files to the test list by editing the localtestrun.testrunconfig file, locate the <path type="file path" > line for deploymentItems and remove the final "\" character for the directory location. For example, change DH2.Test.TR.CRM\Conditions\ to DH2.Test.TR.CRM\Conditions.