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'.
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/
UDPATE 01.06.2018:
SignalR is now available for ASP.Net Core 2.1
SignalR for asp.net core
EDIT: SignalR for asp.net core has been released with .net standard 2.1.
This package targets .net standard 2.0 and is still in the alpha state.
It doesn't seem like a stable release is out before .net standard 2.1.
The packages can be found on myget.
If you load balance your signalr hub you can use redis as backpane.
SignalR for asp.net
And there is also the SignalR package for the .net framework which allready has a stable release. It can be found on nuget.
For load balancing the following backpane types are supported:
SignalR.Server for asp.net core (update 18.09.2017: not available anymore)
Do not use this package!
This is the deprecated package which targets .net 4.5.1 and .net standard 1.6. No stable package has and will ever be released.
The preview packages can be found on myget.
If you load balance your signalr hub you can use sql server as backpane. (But the implementation is broken)
That is correct. SignalR is built on OWIN, which is compatible with asp.net core if you target the full framework, but not dotnet core.
SignalR 2 is built for .NET Framework, not for .NET Core. They are still working on SignalR for .NET Core.
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.
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.
I recently migrated an MVC5 application that used SignalR to ASP.NET Core 1.1 (
netcoreapp1.1
). I found an unofficial package (Gray.Microsoft.AspNetCore.SignalR.Server
) that worked straight almost without any changes to my existing code.csproj file
Startup - ConfigureServices method
Startup - Configure method
The following packages can be found on NuGet.
Microsoft.AspNetCore.SignalR 1.0.0-alpha1-final Components for providing real-time bi-directional communication across the Web.
Microsoft.AspNetCore.SignalR.Redis 1.0.0-alpha1-final Redis for ASP.NET Core SignalR.
The packages supported .NETSTandard,Version=v2.0 Now. I used the packages in my projects. Angular 4 + SignalR
SignalR is introduced with .NET Core Here is the link for implementation https://www.youtube.com/watch?v=1TrttIkbs6c