drei3837
✅ SignalR in a background service
I created a worker service project , installed Microsoft.Asp.netcore.SignalR.Client package but i cant add it in the program.cs file.
Error: CS1061 ISericeCollection does not contain the definition for addSignalR and no accessible extension method addSignalR accepting a first argument of type IServiceCollection could be found(are you missing a using directive or an assembly reference?)
How can i configure it?
This is the code:
var builder = Host.CreateApplicationBuilder(args);
builder.Service.AddHostService<Worker>();
builder.Service.addSignalR(); <- here i get the error
var host = builder.Build();
host.Run();
41 replies