C#C
C#2y ago
hutonahill

✅ BuildServiceProvider does not exist

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.
Was this page helpful?