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

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

问题描述

我只是试着部署MVC3应用到我们的IIS7的托管环境,但我被psented wtih以下异常$ P $:

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,文化=中立,
  公钥= 31bf3856ad364e35'。
  说明:未处理的异常
  的执行过程中发生
  当前Web请求。请检查
  堆栈跟踪有关的详细信息
  该错误以及它起源于
  在code。

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,文化=中立,
  公钥= 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'.

有什么建议?

该应用程序没有被斌部署我已经安装ASP.Net Web页面和MVC3 Web服务器本身。

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