问题描述
我在VS2010中有一个测试项目,我需要从命令行运行单元测试。在一台机器上,以下情况工作正常:1)通过MSBuild test_project.csproj构建测试
2)通过MSTest /testcontainer:test_project.dll运行测试
但在另一台机器上,第二步产生了一个奇怪的错误消息,即:文件扩展名指定'.dll'不是有效的测试扩展名
任何想法如何处理?
谢谢!
检查安装了Visual Studio 2010的PC上的注册表: HKEY_LOCAL_MACHINE\SOFTWARE \Wow6432Node\Microsoft\VisualStudio\10.0\EnterpriseTools\QualityTools\TestTypes\
。
这包含所有条目关于MSTest的允许的扩展名。也可能最好搜索测试类型键(例如 {13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b}
)并确保它们存在( .dll
必须在允许的扩展列表中)
I have a test project in VS2010, and I need to run the unit tests from command line. On one machine the following scenario works just fine:
1) Build the tests via "MSBuild test_project.csproj"
2) Run the tests via "MSTest /testcontainer:test_project.dll"
But on the other machine the 2nd step produced a weird error message, namely: "File extension specified '.dll' is not a valid test extension"
Any idea how to tackle this?
Thanks!
Check the registry on a PC that has Visual Studio 2010 installed: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\EnterpriseTools\QualityTools\TestTypes\
.
This contains all entries in regards to allowed extensions for MSTest. It would also probably be best to search for the test type keys (e.g. {13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b}
) and making sure they exist (.dll
must be in the list of allowed extensions)
这篇关于MSTest:“指定的文件扩展名”.dll“不是有效的测试扩展名”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!