简体   繁体   中英

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

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?

在此处输入图片说明

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM