© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
14 replies
hutonahill

✅ BuildServiceProvider does not exist

private static IServiceProvider _services;
...
IServiceCollection temp = new Microsoft.Extensions.DependencyInjection.ServiceCollection();
_services = temp.BuildServiceProvider();
private static IServiceProvider _services;
...
IServiceCollection temp = new Microsoft.Extensions.DependencyInjection.ServiceCollection();
_services = temp.BuildServiceProvider();


everyone i can find online says this is how to get an instance of IServiceProvider, but it does not work. i found one person with my issue, but they had the wrong useing declaration.
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

debug profile does not exist
C#CC# / help
4y ago
✅ Relation Does not Exist when running Tests
C#CC# / help
11mo ago
UniqueIdentifer Type does not exist Ef Core
C#CC# / help
2y ago
❔ ✅ Does not exist in the current context
C#CC# / help
3y ago