TFS Continuous Build - MSBuild - Running Test fails when search Config files -
I have a problem with the running test on the VS TFS 2008 constant build. The problem is that the MSTest.exe search config file is under "C: \ Program Files (x86) \ Microsoft Visual Studio 9.0 \ Common7 \ IDE \" path, hence the error is:
C: \ Program Files (X86) \ Microsoft Visual Studio 9.0 \ Common7 \ IDE \ MyConfig.config could not be found.
Is there a way to specify MSTest.exe where the config file was found?
How can I specify in TFSBuild.proj?
My TFSBuild.proj file contains these settings:
& lt; Asset group & gt; & Lt; RunTest & gt; True & lt; / RunTest & gt; & Lt; / PropertyGroup & gt;
and
Thanks a lot!
Use your unit in test code. So you can control which files are deployed while running a test. For example:
[DeploymentItemAttibute ("MyConfig.config", "MyConfig.config")] [TestMethod] (...)
Before running a test, copy the MyConfig.config file to the current directory. Hope that helps,
Comments
Post a Comment