JetBrains Resharper 9 Ultimate Test Runner error: NUnit.Core.UnsupportedFrameworkException: Skipped loading assembly {MyAssembly}

丶灬走出姿态 提交于 2019-12-01 02:39:20

As Yousefi mentioned, this is fixed by updating to version 10 of ReSharper. I had the same issue and that resolved it.

Stephen

As mentioned in the accepted answer, ReSharper 9 does not support NUnit 3. The solution as stated does work (i.e. update to ReSharper 10), however, for those who do not have this option (e.g. licensing), you can downgrade your version of NUnit by following the below steps:

  1. Open Nuget Package Manager Console by going to Tools -> Nuget Package Manager -> Package Manager Console
  2. In the console that pops up (usually at the bottom), under the dropdown for "Default project:" choose the test project you wish to downgrade
  3. Run the following commands Uninstall-Package NUnit followed by Install-Package NUnit -Version 2.6.4

Your tests should now run using ReSharper 9.

As mentioned in the other answer, the real fix is to upgrade to ReSharper 10. But if you can't do that, you can disable ReSharper 9's unit-test functionality and fall back to Visual Studio's built-in Test Explorer.

To do this:

  1. Choose the ReSharper > Options... menu item, go to the Unit Testing panel, and uncheck the Enable Unit Testing box.
  2. Restart Visual Studio.
  3. Use the Test > Windows > Test Explorer menu item to display Visual Studio's Test Explorer.

What worked for me (VS 2015):

1) installed NUnit Test Adapter 3.2

2) opened Test Explorer: VS -> menu Test -> Windows -> Test Explorer

3) ran test: In Test Explorer window (if no test, rebuild solution) selected test to run, right clicked and "Run Selected Tests"

voila I can see the test in Test Explorer window and select one and debug it.

Going into the ReSharper v10 Options screen, under Tools | Unit Testing | NUnit, there is an option setting for When to use NUnit 3 test runner. Setting this to Always resolved the problem for me. The error message shown above no longer appears after making this change.

Unable to run NUnit's unit tests with ReSharper's test runner

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!