【问题标题】:how to use DotNetOpenAuth.Core, Version=4.3.0.0 with vs 2012如何在 vs 2012 中使用 DotNetOpenAuth.Core,Version=4.3.0.0
【发布时间】:2013-11-16 16:25:35
【问题描述】:

我正在使用带有 asp mvc 4 的 Visual Studio(2012 或 2013) 它给了我以下错误:


Could not load file or assembly 'DotNetOpenAuth.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

我需要使用version 4.3.0.0 我使用nuget 安装它

【问题讨论】:

  • 您可以在您的项目中发布所有引用的 DotNetOpenAuth dll 吗?

标签: asp.net-mvc asp.net-mvc-4 visual-studio-2012 nuget dotnetopenauth


【解决方案1】:

我知道我遇到了 System.Mvc 依赖项版本错误的问题。将以下程序集“重新绑定”添加到您的 web.config 解决了问题(注意版本号):

<configuration>
   <runtime>
      <!-- When targeting ASP.NET MVC 3-4, this assemblyBinding makes MVC 1 and 2 references relink
           to MVC 3-4 so libraries such as DotNetOpenAuth that compile against MVC 1 will work with it. -->
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
         <dependentAssembly>
            <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
         </dependentAssembly>
      </assemblyBinding>
   </runtime>
</configuration>

旁注:我发现 DotNetOpenAuth.Ultimate 将所有内容捆绑到一个 DLL 中!维护默认的 DotNetOpenAuth 及其大量的包要简单得多....

【讨论】:

    猜你喜欢
    • 2020-03-04
    • 1970-01-01
    • 1970-01-01
    • 2016-05-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多