如何在Visual Studio 2010测试项目中关闭卷影副本?
使用NUnit时,我可以关闭卷影副本,以便从输出目录运行我的测试程序集.之所以需要它,是因为在这种情况下,我的测试不是单元测试,而是集成测试,它需要能够访问某些由内部版本复制到输出目录中的程序集.
When using NUnit, I can turn off shadow copy so that my test assemblies are run from the output directory. I need this because my tests in this case aren't unit tests, but are integration tests which need to be able to access some of the assemblies that are copied into the output directory by the build.
但是,当我使用Visual Studio 2010测试运行程序运行Visual Studio测试项目时,我找不到关闭卷影副本的方法.
However, I can't find a way of turning off shadow copy when I'm using the Visual Studio 2010 test runner to run Visual Studio Test Projects.
有人可以让我知道该怎么做吗?
Could someone please let me know how to do that?
显然没有办法.相反,您必须标记要复制的程序集以及被测程序集.感谢 Ewald Hofman :
Apparently there isn't a way of doing this. Instead, you must flag the assemblies you want copied along with the assembly under test. Thanks to Ewald Hofman:
您应该将其转过来,然后使用 要引入的DeploymentItem属性 依赖程序集进入测试 环境.
You should turn it around, and use the DeploymentItem attribute to bring in the dependent assemblies into the test environment.