我怎样才能获得与QUOT;复制到输出目录"在单元测试工作? [英] How can I get "Copy to Output Directory" to work with Unit Tests?

查看:244
本文介绍了我怎样才能获得与QUOT;复制到输出目录"在单元测试工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我建立一个单元测试项目的测试执行之前测试输出复制到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.

这篇关于我怎样才能获得与QUOT;复制到输出目录"在单元测试工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆