© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•17mo ago•
10 replies
watermelon

How can I get service provider from service collection?

Hello, everyone.
am working on console app using meditR, want to get service provider from service collection.

I've got a compile error on ServiceCollection.BuildServiceProvider
IServiceCollection' does not contain a definition for 'BuildServiceProvider' and no accessible extension method 'BuildServiceProvider' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?
IServiceCollection' does not contain a definition for 'BuildServiceProvider' and no accessible extension method 'BuildServiceProvider' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?
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

Service Provider Question
C#CC# / help
6mo ago
❔ Service provider, IDisposable
C#CC# / help
3y ago
❔ Only a single database provider can be registered in a service provider
C#CC# / help
3y ago
How to get Windows.Storage.Provider
C#CC# / help
2y ago