Can you use Microsoft.AspNet.SignalR.Client with .NET Core (dnxcore)

It could just be No, if it’s not possible, so first I’ll ask directly: is it possible to use Microsoft.AspNet.SignalR.Client with dnxcore50 now?

If possible, the details of the error that I click below is the vNext console application:

After adding the dependency on the version of Microsoft.AspNet.SignalR.Client version 2.2.0, the code compiles correctly for dnx451, however for dnxcore50 I get an error that I cannot understand:

var hubConnection = new HubConnection("http://localhost"); IHubProxy hubProxy = hubConnection.CreateHubProxy("MyHubName"); 

Visual Studio underlines the CreateHubProxy () method with an error:

The type "Object" is defined in an assembly that is not referenced. You must add the assembly reference 'mscorlib, Version = 2.0.5.0, Culture = neutral, PublicKeyToken = 7cec85d7bea7798e, Retargetable = Yes'

Obviously, as I want to use dnxcore50, I cannot just add a link to mscorlib. I am trying to find out if there is something under the System that I should refer to here, or if this package is simply incompatible.

+5
source share
1 answer

I found out that there is currently no (reasonably simple) way to get this to work on dnxcore50.

I also asked Scott Hanselman on Twitter, and he confirmed that you cannot right now.

With this, I will continue to use the console application project vNext, so that when the SignalR client library libraries offer support, this should be the case if you change the configuration and update the package to run on Linux and Mac using .NET Core

+3
source

Source: https://habr.com/ru/post/1247540/


All Articles