Resharper 10: Nunit Tests not Running anymore

Some tests do not work anymore with Resharper 10. We use still Nunit dll version 2.6.3.13283. The tests work with the Nunit runner tool and even NCrunch can handle them. They also work with Resharper 9. We have several affected projects.

The errors look like this:

System.AggregateException : One or more errors occurred.
  ----> System.InvalidOperationException : This module requires Ninject.Web.WebAPI extension

The Ninject.Web.WebAPI Nuget Package is installed for this project. Extensions like Ninject.Web.WebAPI will be loaded dynamically from the build folder while starting the test. Does the runner now ignore packages that are not directly referenced by the code?

5 comments
Comment actions Permalink

We have found a work around for this. Loading the modules manually works:

            IKernel kernel = new StandardKernel(new NinjectSettings { LoadExtensions = false });
            kernel.Load(new WebApiModule());
            kernel.Load(new ContextPreservationModule());
            kernel.Load(new NamedScopeModule());
            kernel.Load(new FuncModule());

It seems that "auto" load ninject extensions ("modules") does not work anymore within the resharper 10 nunit runner. Maybe it also affects other libraries that scan for assemblies in the build folder.

0
Comment actions Permalink

We have the same problem here with Resharper 10.

We are using Ninject.Extensions.Conventions to simplify the binding configuration but now the integration tests are no longer runner within Resharper 10. This extension is also scanning assemblies during runtime.

No time yet to investigate it further in more details.

0
Comment actions Permalink

If you have shadow copy enabled, .net itself won't copy assemblies that aren't directly referenced by the test assemblies. You can disable shadow copy in the unit testing options (and if you use the Save To button, you can disable it per solution).

0
Comment actions Permalink

I already disabled this option but it did not solve the issue.

0
Comment actions Permalink

We submitted https://youtrack.jetbrains.com/issue/RSRP-450562 about such issue. You are welcome to comment and vote for it.

0

Please sign in to leave a comment.