My .NET SignalR client code not working any more in Core 3 (WPF):
string hubAddress = "https://localhost:44329/Hub";
HubConnection hub = new HubConnectionBuilder().WithUrl(hubAddress).Build(); // WithUrl not found
MS document said it is there
Anyone know how to fix this?
Found a solution: make sure project referencing Microsoft.AspNetCore.SignalR.Client, but not Microsoft.AspNetCore.SignalR.Client.Core.
Remove the dependency Microsoft.AspNetCore.SignalR.Client.Core
from you app and then add
Using Package Manager Console
Install-Package Microsoft.AspNetCore.SignalR.Client -Version 6.0.0
Using .Net CLI
dotnet add package Microsoft.AspNetCore.SignalR.Client --version 6.0.0
It will fix your issue
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