© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
37 replies
Very Funny

Dependency Injection not working (.NET 8)

I am trying to set up DI for my services but I keep running into the same error, regardless of what I try.

builder.Services.AddScoped<IAdminService, AdminService>();
builder.Services.AddScoped<IAdminService, AdminService>();
Is what I keep coming back to in my client side app, but nothing is working.

You can find my code here https://github.com/Ghrafkly/BlazorApp9. You can do a find string on
WEQ
WEQ
to quickly locate the files that are causing issues
image.png
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

❔ SignalR .NET 7 API Dependency injection not working
C#CC# / help
3y ago
dependency injection net framework
C#CC# / help
4y ago
dependency injection in net framework
C#CC# / help
4y ago
Dependency injection
C#CC# / help
6mo ago