问题
The web application is working fine in my VS2010, but when I hosted it on server it shows error below
Could not load file or assembly 'System.Web.Helpers' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
回答1:
Sounds as MVC has not been installed on the server. and The dll is missing in the published (deployed environment). That is the reason why it is working in the local.
Solution - Copy reference to local
- Right click on reference System.Web.Helpers and select Properties
- Change Copy Local to true.
- Build Solution
- Re-dploy solution
来源:https://stackoverflow.com/questions/25261025/could-not-load-file-or-assembly-system-web-helpers-or-one-of-its-dependencies