Could not load file or assembly 'System.Web.Mvc' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Solution
This will make sure all DLLs that are required at run-time are included with the assets, therefore you will NOT need to install MVC3/4 on production server.
- Open your Solution (*.sln file)
- In each of the projects that use "MVC" open "Reference"
- Right click System.Web.Mvc and select Properties
- Change "Copy Local" to True
- Save solution and rebuild.
- Check Bin folder for System.Web.Mvc.dll
Note: Dependable on what other parts of MVC you use you might also need following DLLs
- Microsoft.Web.Infrastrucutre.dll
- System.Web.Helpers.dll
- System.Web.Razor.dll
- System.Web.Webpages.dll
- System.Web.WebPages.Deployment.dll
- System.Web.WebPages.Razor.dll
No comments :
Post a Comment