SignalR不能与.Net Core一起使用 [英] SignalR cannot be used with .Net Core

查看:421
本文介绍了SignalR不能与.Net Core一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的 C#Asp.Net核心项目中使用NuGet包管理器安装 SignalR ,但是却收到SignalR与.net核心不兼容的错误消息,真的还不支持吗?还是我可以做些什么来使其正常工作? (如果要提到这一点,我正在使用VS2017)。错误:

I am trying to install SignalR using NuGet package manager in my C# Asp.Net core project, but I get this error that SignalR is not compatible with .net core, is it really not supporter yet? or can I do something to get it work? (I am using VS2017 if it was important to mention that). The error:

Restoring packages for D:\Test\Test.WebAPI\Test.WebAPI.csproj...
Package Microsoft.AspNet.SignalR.Core 2.2.1 is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Package Microsoft.AspNet.SignalR.Core 2.2.1 supports: net45 (.NETFramework,Version=v4.5)
Package Owin 1.0.0 is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Package Owin 1.0.0 supports: net40 (.NETFramework,Version=v4.0)
Package Microsoft.Owin 2.1.0 is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Package Microsoft.Owin 2.1.0 supports:
  - net40 (.NETFramework,Version=v4.0)
  - net45 (.NETFramework,Version=v4.5)
Package Microsoft.Owin.Security 2.1.0 is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Package Microsoft.Owin.Security 2.1.0 supports: net45 (.NETFramework,Version=v4.5)
One or more packages are incompatible with .NETCoreApp,Version=v1.1.
Package restore failed. Rolling back package changes for 'Test.WebAPI'.



更新:



ASP的SignalR。 Net(strong)核心()目前(2018年1月1日)可以在NuGet中以Alpha版本使用。

UPDATE:

SignalR for ASP.Net Core is at the moment (01.01.2018) available in NuGet as alpha version.

https://www.nuget.org/packages/Microsoft.AspNetCore.SignalR/

SignalR现在可用于ASP.Net Core 2.1

SignalR is now available for ASP.Net Core 2.1

推荐答案

SignalR 2是为.NET Framework而不是.NET Core构建的。他们仍在使用SignalR for .NET Core。

SignalR 2 is built for .NET Framework, not for .NET Core. They are still working on SignalR for .NET Core.

一个旧版本显示SignalR是ASP.NET Core 1.2的一部分。 最新修订并未引用SignalR(或任何框架),但确实提及1.2计划于2017年第二季度投放。

An old revision of the ASP.NET Core Roadmap shows SignalR as part of ASP.NET Core 1.2. The latest revision makes no reference to SignalR (or any of the framework) but does mention 1.2 is scheduled for Q2 2017.

视频微软在哪里讨论ASP.NET Core中的SignalR。这是一个小时的时间,所以我不会为您看。但是也许其中有一些有用的信息。

There's a video where the Microsoft guys are discussing SignalR in ASP.NET Core. It's an hour long so I'm not going to watch it for you. But perhaps some useful information is in there.

这篇关于SignalR不能与.Net Core一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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