nunit 网络驱动器,无法加载测试
我们目前在映射驱动器上进行开发。当我针对测试程序集编写 nunit 测试时,它将拾取该程序集,但无法识别任何测试。
如果我将解决方案等移动到本地驱动器并再次引用它,那么一切都会正常工作。
我真正想知道的是为什么会造成这种情况,以及如何继续使用网络驱动器进行开发。
We currently carry out development on a mapped drive. When I write nunit tests against a test assembly it will pick up the assembly, however does not recognise any of the tests.
If I move the solultion etc to a local drive and reference it again then everything works fine.
What I really woiuld like to know is why this is being caused, and how I can carry on using a network drive for development.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据 链接,NUnit 显然没有适当的权限在网络驱动器上访问程序集。建议的修复方法是添加构建后事件以将程序集复制到本地临时目录并在复制的程序集上运行 NUnit:
由于此更改,您可能会遇到的潜在问题与 AppBase 有关,根据 无法加载;因为它不位于 Appbase 下。答案是更新 .nunit 文件中的 Settings 元素以包含 C:\Temp\NUnit 的应用程序库,然后更新程序集元素的路径以删除任何前导目录信息。
Per Link, NUnit apparently does not have appropriate permissions to access the assembly when on a network drive. The suggested fix is to add a post-build event to copy the assembly to a local temp directory and run NUnit off that copied assembly:
A potential issue you may have as a result of this change is related to the AppBase as per Unable to load <mytest> because it is not located under Appbase. The answer there is to update the Settings element within the .nunit file to include an app base of C:\Temp\NUnit then update the assembly element's path to remove any leading directory information.