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

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

问题描述

我刚刚尝试在我们的IIS7主机环境中部署了一个MVC3应用程序,但是正在出现以下异常:

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'。
描述:执行
当前Web请求期间发生未处理的异常
。请查看
堆栈跟踪,了解有关
错误的更多信息,以及
中的代码。

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,
Version = 1.0.0.0,Culture = neutral,
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中。您需要将此引用添加到您的项目中。右键单击引用并转到属性,然后将副本设置为local。

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天全站免登陆