防止MSTest复制/部署每个dll [英] Prevent MSTest from copying / deploying every dll

查看:83
本文介绍了防止MSTest复制/部署每个dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从Visual Studio运行MSTest时-单元测试执行时间相对较快.

When running MSTest from Visual Studio - the unit test execution time is relatively quick.

从命令行运行MSTest时,带有/testsettings标志-执行将永久执行,这是因为它将花费其启动时间的95%将dll复制到其Out文件夹.有办法防止这种情况吗?

When running MSTest from the command line, with /testsettings flag - the execution takes forever and that is because it spends 95% of its startup time copying the dll's to its Out folder. Is there a way to prevent this?

项目中的默认Local.testsettings没有对其进行任何修改(这也意味着它是空的).但是,如果我尝试从命令行使用同一文件,则MSTest会抱怨缺少单元测试引用的DLL.

The default Local.testsettings in the project has no modifications to it (which also means it is empty). However, if I try to use that same file from the command line, MSTest complains about missing DLL's that the Unit Test reference.

推荐答案

您是否尝试过在测试设置中禁用部署?禁用该选项后,应在原位运行测试,而不要在复制的程序集上运行测试. (请参见 http://msdn.microsoft.com/en-us/library/ms182475 .aspx 以获取详细信息.)

Have you tried disabling deployment in the test settings? When it is disabled, the tests should be run in-place rather than on copied assemblies. (See http://msdn.microsoft.com/en-us/library/ms182475.aspx for details.)

这篇关于防止MSTest复制/部署每个dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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