Bun*_*nut 13 c# nunit visual-studio nunit-3.0
我有一个使用NUnit运行单元测试的单独测试项目的webappliction.当我的测试项目试图发现测试时,我遇到以下异常:
An exception occurred while test discoverer 'NUnit3TestDiscoverer' was loading tests. Exception: Could not load file or assembly 'nunit.engine, Version=3.7.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb' or one of its dependencies. The system cannot find the file specified.
Run Code Online (Sandbox Code Playgroud)
这当然是一个非常常见的错误,但是我无法在任何地方找到对此特定程序集的引用,或者其他依赖项实际上导致了该问题.另一件事是我目前已经3.9.0安装了NUnit而不是上面提到的3.7.0.我已经尝试清理和重建解决方案并恢复所有Nuget包并清除obj目录也没有帮助.
Rob*_*use 19
使用最新版本的Visual Studio时,这种情况经常发生.我们不确定原因,但原因是Visual Studio缓存中的测试适配器的不完整副本.解决方法是删除缓存的副本并重新启动Visual Studio.
您要删除的文件夹C:\Users\username\AppData\Local\Temp\VisualStudioTestExplorerExtensions\NUnit3TestAdapter.3.x.x取决于您的用户名和版本.
请参阅https://github.com/nunit/nunit3-vs-adapter/issues/261和http://hermit.no/how-to-resolve-cases-of-visual-studio-no-tests-appearing/
| 归档时间: |
|
| 查看次数: |
5970 次 |
| 最近记录: |