我怎样才能获得与QUOT;复制到输出目录"在单元测试工作?单元测试、目录、工作、QUOT

2023-09-02 21:42:59 作者:年少时的梦依旧还在

当我建立一个单元测试项目的测试执行之前测试输出复制到TestResults文件夹,然后执行测试。我遇到的问题是,并非所有的调试/ bin目录中的文件复制到TestResults项目。

When I build a unit test project before the tests are executed the test output is copied to a TestResults folder and then the tests are executed. The issue I'm having is that not all the files in the Debug/bin directory are copied to the TestResults project.

我怎样才能被复制到调试/ bin目录也被复制到TestResults文件夹中的文件?

How can I get a file that is copied to the Debug/bin directory to also be copied to the TestResults folder?

推荐答案

标准的方式来做到这一点是通过指定的部署项在 .testrunco​​nfig 的文件,该文件可以通过的编辑测试运行配置在Visual Studio项目的的测试的菜单,或在解决方案项目的文件夹中。

The standard way to do this is by specifying the deployment items in the .testrunconfig file, which can be accessed via the Edit Test Run Configurations item in the Visual Studio Test menu or in the Solution Items folder.