Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is difference between microsoft.aspnetcore.signalr.client and microsoft.aspnetcore.signalr.client.core?

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.

like image 510
Alexan Avatar asked May 29 '20 01:05

Alexan


People also ask

What is SignalR .NET core?

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.

What is SignalR client?

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 .

What platform does SignalR client supports?

SignalR can be used in the following browsers: Microsoft Internet Explorer versions 11. Windows only. Microsoft Edge(Chromium).

Which package is used for SignalR?

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.

What is ASP NET Core SignalR client?

ASP.NET Core SignalR .NET Client. The ASP.NET Core SignalR .NET client library lets you communicate with SignalR hubs from .NET apps.

What is the difference between SignalR and ASP?

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.

What is SignalR client in WPF?

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.

What is SignalR client NuGet?

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.


1 Answers

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.

enter image description here

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?)

like image 141
Fei Han Avatar answered Sep 27 '22 17:09

Fei Han