SignalR 2.0.2和2.0.0 Owin依赖冲突 [英] SignalR 2.0.2 and Owin 2.0.0 dependency conflict

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

问题描述

我试图让SignalR在MVC5项目,个人账户的工作。

I'm trying to get SignalR working in an MVC5 project with individual accounts.

该MVC项目具有默认Owin 2.0.0和所有的Owin的。*组件也2.0.0。

The MVC project has by default Owin 2.0.0 and all of the Owin.* components are also 2.0.0.

所以我用的NuGet来获取所有SignalR包,它会自动解决依赖关系和下载v 2.0.2。

So I used NuGet to get all the SignalR packages, it automatically resolved dependancies and downloaded v 2.0.2.

该项目引发错误在启动时,出现以下消息:

The project throws an error on startup with the following message:

无法加载文件或程序集Microsoft.Owin,版本= 2.0.1.0,文化=中性公钥= 31bf3856ad364e35

Could not load file or assembly 'Microsoft.Owin, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

我也试过升级Owin到2.1.0,但是这并没有帮助。

I also tried upgrading Owin to 2.1.0 but that didn't help either.

有没有人面临同样的问题,什么是解决?

Has anyone faced the same problem and what was the solution?

推荐答案

您可以更新此引用我发现最新版本(目前为2.1.0):

You can update this references to the lastest version I found (now is 2.1.0):

Install-Package Microsoft.Owin -Version 2.1.0
Install-Package Microsoft.Owin.Security -Version 2.1.0

,并确保您的Web.config对2.1.0版本的这些结合重定向:

And make sure your Web.config have these binding redirects for version 2.1.0:

<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

或者你可以更新此引用2.0.1版本:

Or you can update this references to version 2.0.1:

Install-Package Microsoft.Owin -Version 2.0.1
Install-Package Microsoft.Owin.Security -Version 2.0.1

,并确保您的Web.config对2.0.1版本的这些结合重定向:

And make sure your Web.config have these binding redirects for version 2.0.1:

<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-2.0.1.0" newVersion="2.0.1.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-2.0.1.0" newVersion="2.0.1.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

这篇关于SignalR 2.0.2和2.0.0 Owin依赖冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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