如何获得“复制到输出目录"?使用单元测试? [英] How can I get "Copy to Output Directory" to work with Unit Tests?

查看:23
本文介绍了如何获得“复制到输出目录"?使用单元测试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在执行测试之前构建单元测试项目时,测试输出将复制到 TestResults 文件夹,然后执行测试.我遇到的问题是并非 Debug/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.

如何将复制到 Debug/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 Test 菜单或 Solution Items 文件夹中编辑测试运行配置项.

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.

这篇关于如何获得“复制到输出目录"?使用单元测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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