question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to use SignalR HubConnectionBuilder.WithUrl and HttpConnectionOptions in Core 3.0

See original GitHub issue

Using latest Core 3.0

I’m trying:

    hubConnection = new HubConnectionBuilder().WithUrl("http://localhost:5000/hubs/agenthub", options => options.Cookies.Add(myCookie)).Build();

I get:

Error CS0012 The type 'HttpTransportType' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.AspNetCore.Http.Connections.Common, Version=3.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. VoyAdminAgent

If I try to install package Microsoft.AspNetCore.Http.Connections.Common, the latest nuget version is 1.1.0 and I then get:

Error CS1705 Assembly 'Microsoft.AspNetCore.SignalR.Client' with identity 'Microsoft.AspNetCore.SignalR.Client, Version=3.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' uses 'Microsoft.AspNetCore.Http.Connections.Common, Version=3.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' which has a higher version than referenced assembly 'Microsoft.AspNetCore.Http.Connections.Common' with identity 'Microsoft.AspNetCore.Http.Connections.Common, Version=1.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'

Any help ?

PM> get-package
Microsoft.EntityFrameworkCore       {3.0.0-preview.18572.1}                  VoyAdminAgent                                                                       
Microsoft.EntityFrameworkCore.Sq... {3.0.0-preview.18572.1}                  VoyAdminAgent                                                                       
Microsoft.AspNetCore.SignalR.Client {3.0.0-preview-18579-0056}               VoyAdminAgent                                                                       
Microsoft.NETCore.App               {3.0.0-preview-27122-01}                 VoyAdminAgent                                                                       

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
BrennanConroycommented, May 28, 2019

I’m guessing you’re referencing nuget package “Microsoft.AspNetCore.SignalR.Client.Core” instead of “Microsoft.AspNetCore.SignalR.Client”

0reactions
adamradoczcommented, May 28, 2019

I see. I moved on and chose another way, so I can’t provide a sample app. Thanks anyway.

Read more comments on GitHub >

github_iconTop Results From Across the Web

WithUrl() not found in Core 3 client
Found a solution: make sure project referencing Microsoft.AspNetCore.SignalR.Client, but not Microsoft.AspNetCore.SignalR.Client.Core.
Read more >
ASP.NET Core SignalR configuration
The Java client defaults to using the WebSockets transport. Java Copy. HubConnection hubConnection = HubConnectionBuilder.create( ...
Read more >
HubConnectionBuilder Class
Configures the HubConnection to use HTTP-based transports to connect to the specified URL and transports. WithUrl(IHubConnectionBuilder, Uri, HttpTransportType, ...
Read more >
microsoft/signalr
The CDN for @microsoft/signalr. ... @microsoft/signalr/src/HubConnectionBuilder.ts. Version: ... 192, // If httpConnectionOptions has a logger, use it.
Read more >
Getting started with SignalR using ASP.NET Core and Angular
This article shows how to setup a first SignalR Hub in ASP.NET Core 2.2 and use it with an Angular client. SignalR was...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found