✅ BuildServiceProvider does not exist
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.
private static IServiceProvider _services;
...
IServiceCollection temp = new Microsoft.Extensions.DependencyInjection.ServiceCollection();
_services = temp.BuildServiceProvider();