升级到MVC2 MVC3 - 问题只在服务器 [英] Upgrade MVC2 to MVC3 - Problem only on Server

查看:103
本文介绍了升级到MVC2 MVC3 - 问题只在服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经升级使用这个工具我MVC2项目MVC3:的http://blogs.msdn.com/b/marcinon/archive/2011/01/13/mvc-3-project-upgrade-tool.aspx

I have upgrade my MVC2 project to MVC3 using this tool: http://blogs.msdn.com/b/marcinon/archive/2011/01/13/mvc-3-project-upgrade-tool.aspx

这是工作的罚款和我的项目也是在我的本地PC运行过程中出现细,但是当我把它部署到服务器上,这也是安装了MVC3,它只是这个错误:

Which is working fine and my Project is also runnig fine on my local pc, but when i deploy it to the server, which is also has MVC3 installed, it just return this error:

c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\a8d37933\32de45bd\assembly\dl3\b1e279bf\0dc3e090_ffd7cb01\BaseUtility.DLL: error CS1705: Assembly 'BaseUtility, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
c:\Windows\assembly\GAC_MSIL\System.Web.Mvc\2.0.0.0__31bf3856ad364e35\System.Web.Mvc.dll: (Location of symbol related to previous error)

和我的webconfig还含有这一部分:

And my webconfig also contain this part:

<compilation debug="true" targetFramework="4.0">
  <assemblies>
    <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    <add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
  </assemblies>
</compilation>


<runtime>
  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
      <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
      <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0" />
    </dependentAssembly>
  </assemblyBinding>
</runtime>

任何人都有一个想法如何解决这个问题,
提前致谢
杰克

Anyone have a idea how do i fix this problem, Thanks in advance Jack

推荐答案

感谢Hambonious,这解决了我的问题:

Thanks Hambonious, This solved my problem:

我已经检查了我的webconfig文件,并发现了其中的一部分在仍然使用MVC2。

I have checked my webconfig file and found out that a part of it is still using MVC2 in the .

这篇关于升级到MVC2 MVC3 - 问题只在服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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