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

Pouya Yousefi picture Pouya Yousefi · Nov 24, 2015 · Viewed 11.2k times · Source

This seems to be an error with the JetBrains Resharper 9.1 Ultimate Test Runner referencing an older version of NUnit. I am using NUnit 3.0 in my assembly.

[Window Title]
Unit Test Runner

[Main Instruction]
Unit Test Runner failed to run tests

[Expanded Information]
at NUnit.Core.Builders.TestAssemblyBuilder.GetCandidateFixtureTypes(Assembly assembly, String ns)
at NUnit.Core.Builders.TestAssemblyBuilder.GetFixtures(Assembly assembly, String ns)
at NUnit.Core.Builders.TestAssemblyBuilder.Build(String assemblyName, Boolean autoSuites)
at NUnit.Core.Builders.TestAssemblyBuilder.Build(String assemblyName, String testName, Boolean autoSuites)
at NUnit.Core.TestSuiteBuilder.Build(TestPackage package)
at NUnit.Core.SimpleTestRunner.Load(TestPackage package)
at NUnit.Core.ProxyTestRunner.Load(TestPackage package)
at NUnit.Core.RemoteTestRunner.Load(TestPackage package)
at JetBrains.ReSharper.UnitTestRunner.nUnit.BuiltInNUnitRunner.RunTests(IRemoteTaskServer server, Dictionary`2 tests, Dictionary`2 fixtures, List`1 explicitly, Boolean useAddins, List`1 assemblies)

EDIT: Problem goes away with upgrade to version 10 of Resharper.

Answer

Stephen picture Stephen · Mar 13, 2016

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.