assemblybinding在mstest中不起作用 [英] assemblybinding does not work in mstest
问题描述
我有一个非常简单的MSTest单元测试项目,该项目间接依赖于MVC的两个版本.
I have a very simple MSTest unit test project that indirectly have dependency on two versions of MVC.
assemblybinding配置为重定向到MVC v4
assemblybinding in app.config is configured to redirect to MVC v4
当我运行mstest测试运行程序(内置VS2012 RC)时-我收到异常消息,指示程序集绑定无效.
when I run mstest test runner (VS2012 RC built-in) - I get exception indicating that assembly binding did not work.
如果我创建testsettings文件并禁用部署(或启用部署并将app.config添加到要部署的项目列表中),请通过测试.
If I create testsettings file and disable deployment (or enable deployment and add app.config to the list of items to deploy) - test passes.
问题:为什么程序集绑定在部署设置为false的情况下有效?我可以在不使用testsettings文件的情况下通过此测试吗?
Question: why does assemblybinding works with deployment set to false? Can I make this test pass without using testsettings file?
推荐答案
我在vs2012,mstest和R#上遇到了同样的事情,根据这似乎是一个已确认的错误: http://social.msdn .microsoft.com/Forums/zh-CN/vsunittest/thread/234926d1-42c0-4ebb-af39-1626e72f6c39
I am experiencing the same thing with vs2012, mstest and R#, seems to be a confirmed bug according to this: http://social.msdn.microsoft.com/Forums/en-US/vsunittest/thread/234926d1-42c0-4ebb-af39-1626e72f6c39
将链接添加到R#中的同一错误报告:
Adding link to the same bug report in R#:
http://youtrack.jetbrains.com/issue/RSRP-329567
这篇关于assemblybinding在mstest中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!