I'm having a little problem with Running Test on VS TFS 2008 Continuous Build. The problem is that MSTest.exe search config file under "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\" path, so the error is:
C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\MyConfig.config could not be found.
There is a way to specify to MSTest.exe where found config files?
How I can specify that in the TFSBuild.proj?
My TFSBuild.proj file contains these settings:
<PropertyGroup>
  <RunTest>true</RunTest>
</PropertyGroup>
and
<ItemGroup>
  <MetaDataFile Include="$(BuildProjectFolderPath)/../../MyProj.Complete.vsmdi">
   <TestList>Continuous  Integration Test</TestList&g开发者_运维百科t;
   <RunConfigFile>$(SolutionRoot)\LocalTestRun.testrunconfig</RunConfigFile>
  </MetaDataFile>
</ItemGroup>
Thanks a lot!
Use DeploymentItemAttribute in your Unit Tests code. So you can control what files and where are deployed during a test run. For example:
[DeploymentItemAttibute("MyConfig.config", "MyConfig.config")]
[TestMethod]
(...)
This will copy MyConfig.config file to the current directory before a test run. Hope that helps,
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论