问题
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.
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?
回答1:
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:
You should turn it around, and use the DeploymentItem attribute to bring in the dependent assemblies into the test environment.
来源:https://stackoverflow.com/questions/2413832/how-do-i-turn-off-shadow-copy-in-a-visual-studio-2010-test-project