0

I have ASP.NET Core 2.2 app that hosts SignalR hub. I would like to use my WPF application (.NET Framework 4.7.2) to connect this hub. If I add NuGet package Microsoft.AspNetCore.SignalR.Client then I have many DLL files inclued into application references. Adding Microsoft.AspNet.SignalR.Client is much more cleaner but I cannot use it for connection. Is there a workaround for this?

Demir
  • 1,787
  • 1
  • 29
  • 42
  • I suppose you could obtain the source and mash all of the code together into a single DLL. But why bother? – Robert Harvey Jan 14 '19 at 16:11
  • Why does it matter if it has a lot of dependencies? What problem is it causing you? – mason Jan 14 '19 at 16:16
  • @mason, when WPF app published via ClickOnce I get too many DLL files and this increases size of deployment package. – Demir Jan 14 '19 at 16:26
  • So? [ClickOnce] you'll have a one time download for the DLL's. They won't have to redownload them [unless they change](https://stackoverflow.com/questions/2090072). The bottom line is that if you want to consume ASP.NET Core SignalR, then you need all of its dependencies unless you want to take on the massive undertaking of combing the source for it and all its dependencies into a single assembly. Then good luck handling updates to SignalR or any of its dependencies. You could also look into other tools that merge assemblies, but it's too broad of a question for Stack Overflow. – mason Jan 14 '19 at 16:32

1 Answers1

1

You cannot use the ASP.NET CORE SignalR (Hub or Client) with the ASP.NET SignalR (Hub or Client). You have to use a CORE client to connect to a CORE hub.

You are probably getting a 405 method not allowed error when you try.

See my response here that references the documentation.

SignalR version compatability (StatusCode: 405 'Method Not Allowed')

Frank M
  • 1,379
  • 9
  • 18