I can find tutorials to add it to MVC, and even from 2014, an article explaining how to add it to .NET 4.7 windows service.
However with a .NET Core 3.1 windows service, I just cannot figure out how to do it.
Most tutorials seem to revolve around a Startup.cs file which does not exist in a windows service. This is the latest tutorial I could find from Microsoft but it uses a Web App rather than a windows service.
The windows service runs using this code:
var builder = new HostBuilder() .ConfigureServices((hostContext, services) => { services.AddHostedService<MyWindowsService>(); });
I assume that SignalR needs to be set up around here.
I found some evidence you can do WebApp.Start("http://localhost:8080");
but this is OWIN. The example I found (an older version of the one above) then has a Startup class but there's no indication how this class is called. It takes an IAppBuilder
and there's a method on it to add SignalR. However IAppBuilder does not appear to be .NET Core, nor could I find any SignalR methods of any kind.
I wonder if anyone could point me in the right direction?