Visual Studio 2010 MSTest 无法调试引用的程序集

发布于 2024-10-08 00:32:32 字数 264 浏览 0 评论 0原文

我使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

无戏配角 2024-10-15 00:32:32

通过在我的硬盘中搜索相关程序集来修复它。删除所有内容,比我预期的要多得多(临时文件夹),然后重建它。突然,视觉工作室编辑器发现缺少程序集。但引用菜单很好(没有警告,装配路径也正确)。
然后删除读取程序集(项目参考)就可以了。
现在测试正在运行,没有出现任何错误。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文