MVC3 部署依赖问题 [英] MVC3 Deployment Dependency Problems

查看:24
本文介绍了MVC3 部署依赖问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚尝试将 MVC3 应用程序部署到我们的 IIS7 托管环境,但出现以下异常:

I've just tried deploying an MVC3 application to our IIS7 hosting environment but I'm being presented wtih the following exception:

无法加载类型'Microsoft.Web.Infrastructure.DynamicModuleHelper.DynamicModuleUtility'从组装'Microsoft.Web.Infrastructure,版本=1.0.0.0,文化=中性,PublicKeyToken=31bf3856ad364e35'.描述:未处理的异常在执行过程中发生当前网络请求.请查看有关更多信息的堆栈跟踪错误及其起源代码.

Could not load type 'Microsoft.Web.Infrastructure.DynamicModuleHelper.DynamicModuleUtility' from assembly 'Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

异常详情:System.TypeLoadException: 不能负载类型'Microsoft.Web.Infrastructure.DynamicModuleHelper.DynamicModuleUtility'从组装'Microsoft.Web.Infrastructure,版本=1.0.0.0,文化=中性,PublicKeyToken=31bf3856ad364e35'.

Exception Details: System.TypeLoadException: Could not load type 'Microsoft.Web.Infrastructure.DynamicModuleHelper.DynamicModuleUtility' from assembly 'Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

有什么建议吗?

应用程序没有被 bin 部署,因为我已经在 Web 服务器本身上安装了 ASP.Net 网页和 MVC3.

The app isn't being bin deployed as I have installed ASP.Net Web pages and MVC3 on the web server itself.

推荐答案

这是因为 Microsoft.Web.Infrastructure 不在您的 GAC 中.您需要将此引用添加到您的项目中.右键单击引用并转到属性,然后将复制到本地设置为 true.

This is because Microsoft.Web.Infrastructure is not in your GAC. You need to add this reference to your project. Right click the reference and go to properties then set copy to local to true.

输出(忽略 Ninject 和 NCU):

Output (Ignore the Ninject and NCU):

这篇关于MVC3 部署依赖问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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