Visual Studio 2010 MSTest 无法调试引用的程序集
我使用 MSTest 为我的应用程序编写了一个单元测试,该测试使用引用程序集(在本例中为 ExpressionSerializer)中的功能。
它失败是因为我已经修复了一个异常,并且如果我将测试包装在控制台应用程序而不是 TestMethod 中,它就会运行。
奇怪的是,我在使用测试运行器时无法调试程序集(步入,未加载符号),并且再次使用控制台应用程序测试器运行良好。
使用测试运行器时,程序集参考似乎已经过时,但我找不到任何问题。
有什么想法吗?
I wrote an unit-test using MSTest for my Application which uses functionality from a referenced assembly (ExpressionSerializer in this case).
It fails because of an exception I already fixed and it runs if I wrap the test in a console application instead of a TestMethod.
The curious thing is that I can't debug the assembly (step into, no symbols loaded) while using the test runner and again runs fine with the console application tester.
The assembly reference seems out dated using the test runner, but I can't find anything wrong with it.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通过在我的硬盘中搜索相关程序集来修复它。删除所有内容,比我预期的要多得多(临时文件夹),然后重建它。突然,视觉工作室编辑器发现缺少程序集。但引用菜单很好(没有警告,装配路径也正确)。
然后删除读取程序集(项目参考)就可以了。
现在测试正在运行,没有出现任何错误。
fixed it by searching my harddive for the concerning assembly. Deleting every bit, were a lot more than I anticipated (temp folders), and rebuild it. Suddenly visual studios editor is aware of a missing assembly. But the references menu is fine (no warning, the assembly path is correct too).
Then removing readding the assembly (project reference ) does the trick.
Now the tests are running and no errors occur.