Asp.net mvc 为什么Combres仍在寻找较旧版本的System.Web.Mvc?

Asp.net mvc 为什么Combres仍在寻找较旧版本的System.Web.Mvc?,asp.net-mvc,assemblies,asp.net-mvc-3,assembly-resolution,combres,Asp.net Mvc,Assemblies,Asp.net Mvc 3,Assembly Resolution,Combres,我正在与我的MVC3RC项目一起使用,当我将它部署到我的web服务器时,遇到一个程序集绑定错误 System.IO.FileLoadException 无法加载文件或程序集'System.Web.Mvc,Version=2.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35'或其依赖项之一。定位的程序集清单定义与程序集引用不匹配。(来自HRESULT的异常:0x8013100) 我的开发机器在GAC中有MVC1和2程序集,因此在那里工作得

我正在与我的MVC3RC项目一起使用,当我将它部署到我的web服务器时,遇到一个程序集绑定错误

System.IO.FileLoadException
无法加载文件或程序集'System.Web.Mvc,Version=2.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35'或其依赖项之一。定位的程序集清单定义与程序集引用不匹配。(来自HRESULT的异常:0x8013100)

我的开发机器在GAC中有MVC1和2程序集,因此在那里工作得很好。web服务器在GAC中没有任何版本的MVC,我正在部署MVC3Assembly。我的项目引用了System.Web.Mvc的3.0.0.0版本,我的Web.config中有以下部分:

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


我认为本节将告诉Combres使用3.0.0.0版。为什么我的应用程序无法解析引用?

我认为绑定重定向不会连锁-您在某个地方有一个对1.0的引用,并且您的配置告诉它加载2.0,而2.0并不存在

您只需要一个绑定重定向,oldVersion设置为“1.0.0.0-2.0.0.0”