使用非托管 DLL 进行 TFS 单元测试

发布于 2024-10-18 00:38:51 字数 161 浏览 9 评论 0原文

我们需要测试引用非托管 C++ DLL 的 .NET Wrapper DLL 的 .NET 应用程序。

TFS 单元测试项目仅复制 .NET Wrapper DLL,并且最后一项 abd 测试不会失败。

我如何告诉 MSTest 复制所有必需的文件?

谢谢。

We need to test a .NET application that references a .NET Wrapper DLL that references unmanaged C++ DLL.

The TFS Unit Testing project only copies the .NET Wrapper DLL and not the last one abd tests fail.

How can I tell to MSTest to copy all the necessary files?

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

涫野音 2024-10-25 00:38:52

解决方案是将所有必需的文件/DLL 添加到 Local.testsettings 文件的 Deployment 部分,并将 /testsettings:Local.testsettings 参数添加到 MSTest 命令行参数列表中。

The solution was to add all the necessary files/DLL to the Deployment section of the Local.testsettings file and to add the /testsettings:Local.testsettings parameter to the MSTest command line list of parameters.

╰つ倒转 2024-10-25 00:38:52

简短的回答:不能。例如,请参阅此答案

相反,最好的短期解决方案是使用构建后事件。

托管和非托管 dll 可以合并为一个 dll 文件,但有些麻烦。例如 SQLite 就实现了这一点。

Short answer: It cannot. See for example this answer.

Instead the best short term solution is to use a post-build event.

The managed and unmanaged dlls can be merged into one single dll file with some hazzle. For example SQLite achieves this.

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