© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
39 replies
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();
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Data Retrieval in a SignalR Hub/Service?
C#CC# / help
14mo ago
Background Service and Blazor
C#CC# / help
2y ago
Help in understanding a concept in SignalR
C#CC# / help
11mo ago