我如何获得一个单元测试来复制我的DLL和其他文件,当我运行一个测试? [英] How do I get a Unit Test to copy my DLLs and other files when I run a test?
问题描述
我工作的一个应用程序,我创建了一些单元测试它。与测试类的项目取决于3第三方的DLL。当我去bin\Debug文件夹中的测试项目中,DLL是那里。但是当我运行测试,这些DLL不被复制到文件夹TestResult\\Out。
I'm working on an application and I have created a number of unit tests for it. The project with the test class depends upon 3 third party DLLs. When I go to the bin\Debug folder for the test project, the Dlls are there. But when I run the test, the DLLs are not being copied into the TestResult\\Out folder.
有也不同于我想复制了另一个项目log4net.config文件。这一个是没有出现在测试项目的bin\Debug文件夹,所以这是另外一个问题,我必须要修好。
There is also a log4net.config file from another project that I would like to have copied. This one is not showing up in the test project's bin\Debug folder, so that's another issue I have to fix.
我如何获得这些文件的时候我复制运行单元测试?
How do I get these files to copy when I run the unit test?
托尼
推荐答案
我们有一个箱子含第三方DLL的文件夹都将建立的一部分。他们被标记在参考了复制本地属性。
We have a bin folder containing 3rd-party DLL's that have to be part of builds. They are flagged with the 'copy local' attribute in the reference.
对于单个文件,你可以这样做 - 设置复制到输出目录为真。
As for individual files, you can do the same - Set 'Copy to output directory' to true.
这篇关于我如何获得一个单元测试来复制我的DLL和其他文件,当我运行一个测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!