【发布时间】:2017-04-13 08:19:45
【问题描述】:
我正在开发 Web API 项目。我已经编写了单元测试,并且正在使用 Nunit 来运行这些测试。我遇到了这个奇怪的错误。
我打开了 Nunit.exe,在 Project > Add Assembly 下我指定了包含单元测试的 dll。我单击运行,测试执行良好。
我回到 Visual Studio 2015 并对我的测试和构建进行一些编辑。它说,
Could not copy 'location/of/dll'. Exceeded retry count of 10. Failed.
The process cannot access the file 'location/of/dll' because it is being used by another process.
当我关闭 NUnit 应用程序时,构建工作正常。
但几个小时前情况并非如此。每当我在 VS2015 中单击 Build 时,在 Nunit GUI 中它曾经显示 Reloading.. 并且用于重新加载的 dll。
我必须close Nunit > Build in VS > Open Nunit > Add assembly reference > Run 才能运行我的测试用例。有没有人遇到过同样的问题?
【问题讨论】:
标签: c# dll visual-studio-2015 nunit-2.5.9