This project is read-only.


DependencyResolver.SetResolver throwing error


This issue just cropped up recently. In the line of code (VB):

DependencyResolver.SetResolver(New UnityDependencyResolver(RegisterIocServices()))

I am now getting the following error:

ArgumentException was unhandled by user code

The type Unity.Mvc3.UnityDependencyResolver does not appear to implement Microsoft.Practices.ServiceLocation.IServiceLocator. Parameter name: commonServiceLocator

As I said, I had Ioc working and all of a sudden I started getting this error recently.

Any ideas?

file attachments

Closed May 16, 2012 at 5:05 PM by DevTrends
glad you sorted it.


edegagne wrote Apr 4, 2012 at 5:27 PM

For some reason, I uninstalled the package, then reinstalled it, no other changes, and it seems to have resolved itself.

Not sure what caused the actual error though.

k4gdw wrote Aug 24, 2012 at 7:34 PM

Same thing happens with an MVC4 project.