Using SignalR in ASP.NET Core 1.0

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-12 09:55:32

问题


We have an ASP.NET Core 1.0 RC1 application and we want to incorporate SignalR in it. However, SignalR is not yet a part of ASP.NET Core 1.0.

Is there a way to still incorporate SignalR in our existing app or will we have to look into some other web sockets library such as socket.io?


回答1:


Although SignalR 3 won't be a part of the 1.0 release of ASP.NET Core, you can still use SignalR in an ASP.NET Core web app project.

In fact, check out this SignalR project on the official "aspnet" account on Github:

  • https://github.com/aspnet/SignalR-Server

I download the source code, and here's what it looks like in VS2015 (see screenshot below):

Hope that helps! :)




回答2:


I had the same issue with SignalR and the upgrade to core 1.0 rtm. The answer from above does not work anymore so I did the following:

I use this nugget feed:
https://www.myget.org/F/aspnetcirelease/api/v3/index.json
and this nuget package:
"Microsoft.AspNetCore.SignalR.Server": "0.1.0-rtm-21431"

This should help until the first release of SignalR 3



来源:https://stackoverflow.com/questions/37056624/using-signalr-in-asp-net-core-1-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!