AutoData of AutoFixture NUnit2 works under resharper 8.2 and NUnit.Runners, but not resharper 9.

I am sure other AutoData users have had similar problems.

So I got AutoData of AutoFixture working under resharper 8.2 using NUnit.Runners 2.6.3, following this guide:

And unit tests under this project would run perfectly using the above settings:

AutoData works if I run these tests using nunit.exe or nunit-console.exe, both version 2.6.3 / 2.6.4. The latter is used by resharper 9.

Error message: Failed, no arguments were provided.

Under resharper 9 options, I tried to point NUnit to the \lib folder of NUnit.Runners 2.6.3, but no luck.

Any ideas please?

Comment actions Permalink

I think I'll rephrase the question as - Resharper ultimate does not load NUnit addins (or at least not [AutoData]), whereas NUnit.Runners does, as defined on

NUnit examines all assemblies in the bin/addins directory, looking for public classes with the NUnitAddinAttribute and implementing the IAddin interface. It loads all those it finds as Addins.

Obviously any addins, regardless of location, if referenced by the current project, would be loaded and installed for NUnit runners.

So this is clear:

  1. AutoFixture [AutoData] is a NUnit Addin
  2. Resharper 8.2 using NUnit runner 2.6.3 loads this addin successfully, where as
  3. Resharper ultimate using NUnit runner 2.6.4 (or 2.6.3) does not load.
  4. Whereas NUnit-console.exe or NUnit.exe of NUnit.Runners 2.6.3 loads addins.
Comment actions Permalink

This might be shadow copy causing issues - .net itself won't copy assemblies into the shadow copy cache unless they're directly referenced. You can try to disable shadow copy in the Unit Testing page of ReSharper's options.

Another thing to try might be to disable the optimisation that runs multiple assemblies in a single AppDomain (Nunit usually runs an assembly in its own AppDomain). This might have implications on which app.config file is loaded, and that might cause issues.

Comment actions Permalink

Thanks for your reply Matt.

I tried both of your suggestions and none worked. Nor did Resharper 10, so I think something must have been lost in the upgrade.

Is it possible that NUnit addins are just ignored by these newer versions? Just a thought.

Comment actions Permalink

It might be. Would you be able to report it in the issue tracker, please? And a small repro would help a lot. Thanks!

Comment actions Permalink

OK for anybody who is looking at this still, it works with Resharper 10.0.2 and specifying the location of NUnit runner 2.6.3. Didn't get to try with Resharper 9.

Anybody using NUnit 3 try this connector:

Thanks @Matt.


Please sign in to leave a comment.