-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Not sure when this started, but I am using v3 Azure Functions and when the below code runs, the ImplementationInstance is always null on the ServiceDescriptor. Perhaps the behavior has changed under the covers in recent versions, but it now requires calling BuildServiceProvider() and fetching the IConfguration from the IServiceProvider. The impact of this is that any modifications I make to host.json is lost when also using this package.
var descriptor = builder.Services.FirstOrDefault(d => d.ServiceType == typeof(IConfiguration));
if (descriptor?.ImplementationInstance is IConfigurationRoot configuration)
{
configurationBuilder.AddConfiguration(configuration);
}
Metadata
Metadata
Assignees
Labels
No labels