无法加载文件或程序集“System.Web.Helpers"或其依赖项之一 [英] Could not load file or assembly 'System.Web.Helpers' or one of its dependencies

查看:27
本文介绍了无法加载文件或程序集“System.Web.Helpers"或其依赖项之一的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Web 应用程序在我的 VS2010 中运行良好,但是当我将它托管在服务器上时,它显示以下错误

The web application is working fine in my VS2010, but when I hosted it on server it shows error below

无法加载文件或程序集System.Web.Helpers"或其依赖项之一.此程序集由比当前加载的运行时更新的运行时构建,无法加载.

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.

推荐答案

听起来好像服务器上没有安装 MVC.并且在发布的(部署的环境)中缺少 dll.这就是它在本地工作的原因.

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

  1. 右键单击引用 System.Web.Helpers 并选择属性
  2. 将复制本地更改为 true.
  3. 构建解决方案
  4. 重新部署解决方案

这篇关于无法加载文件或程序集“System.Web.Helpers"或其依赖项之一的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆