Which project is throwing "Unable to load one or more of the requested types"?

113 views Asked by At

I have read through lots of SO answers about this problem, but I'm still not sure what's at the root of the issue. When I try to run nopCommerce 4.0 on my localhost, I get the error "Unable to load one or more of the requested types." When I look in LoaderExceptions, I see 12 instances of "Could not not load file or assembly 'System.Web.Mvc...'" and 2 of "Inheritance security rules violated by type 'Autofac.Integration.Mvc.AutofacWebTypesModule'". Unfortunately, there are many projects in this solution and, as far as I can tell, System.Web.Mvc is in all of them. Is there a way to determine exactly which project or projects are having trouble finding this file?

enter image description here

2

There are 2 answers

0
mrcoulson On

It turns out that I was able to solve this on my own. It turns out that there was a plugin I had added that was causing the issue. I'm not sure yet what's wrong with the plugin, but I was able to avoid the error by removing the plugin and clean/rebuilding Nop.Web.Framework.

0
Fix On

Glad to see you were able to find a workaround. My best guess is that the plugin you imported depends on a different version of System.Web.Mvc than your project. From the error message it appears that the framework requires v5.1 which is a version released in 2014.