How do I turn off shadow copy in a Visual Studio 2010 test project?

不问归期 提交于 2019-12-07 20:23:49

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!