There are two nuget packages for SignalR client:
Microsoft.AspNetCore.SignalR.Client and Microsoft.AspNetCore.SignalR.Client.Core.
Both ASP.NET Core, but I can't find any information why they both exist.
Probably Client.Core has limited functionality, but this is just my guess.
What is SignalR? ASP.NET Core SignalR is an open-source library that simplifies adding real-time web functionality to apps. Real-time web functionality enables server-side code to push content to clients instantly. Good candidates for SignalR: Apps that require high frequency updates from the server.
SignalR provides a simple API for creating server-to-client remote procedure calls (RPC) that call JavaScript functions in client browsers (and other client platforms) from server-side .
SignalR can be used in the following browsers: Microsoft Internet Explorer versions 11. Windows only. Microsoft Edge(Chromium).
SignalR. Client NuGet package contains the . NET client libraries for ASP.NET Core SignalR. Use the HubConnectionBuilder to create and build an instance of a connection to a hub.
ASP.NET Core SignalR .NET Client. The ASP.NET Core SignalR .NET client library lets you communicate with SignalR hubs from .NET apps.
ASP.NET Core SignalR ships with a new JSON message protocol that's incompatible with earlier versions of SignalR. In addition, it has a second built-in protocol based on MessagePack, which is a binary protocol that has smaller payloads than the text-based JSON.
The ASP.NET Core SignalR .NET client library lets you communicate with SignalR hubs from .NET apps. The code sample in this article is a WPF app that uses the ASP.NET Core SignalR .NET client. The Microsoft.AspNetCore.SignalR.Client package is required for .NET clients to connect to SignalR hubs.
The Microsoft.AspNetCore.SignalR.Client NuGet package contains the .NET client libraries for ASP.NET Core SignalR. Use the HubConnectionBuilder to create and build an instance of a connection to a hub. ASP.NET SignalR supports SQL Server and Redis. ASP.NET Core SignalR supports Azure SignalR Service and Redis.
Both ASP.NET Core, but I can't find any information why they both exist.
The Microsoft.AspNetCore.SignalR.Client package depends upon the Microsoft.AspNetCore.SignalR.Client.Core package.
And from doc of "ASP.NET Core SignalR .NET Client", we can find that:
The Microsoft.AspNetCore.SignalR.Client package is required for .NET clients to connect to SignalR hubs.
Besides, if you do a test with only installing the Microsoft.AspNetCore.SignalR.Client.Core
package in your client app, you would find you can not call WithUrl
method to configure the HubConnection to use HTTP-based transports to connect to the specified URL.
And it would cause the error, like below.
'HubConnectionBuilder' does not contain a definition for 'WithUrl' and no accessible extension method 'WithUrl' accepting a first argument of type 'HubConnectionBuilder' could be found (are you missing a using directive or an assembly reference?)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With