Open Gamecock opened 6 months ago
@Gamecock Thanks for your feedback! We will investigate and update as appropriate.
I have the same issue here as well.
Hello,
@RamanathanChinnappan-MSFT and @ggailey777 could you please write down the solution? Is there any solution for the scenario above? Thanks!
error CS1061: 'IServiceCollection' does not contain a definition for 'ConfigureFunctionsApplicationInsights' and no accessible extension method 'ConfigureFunctionsApplicationInsights' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?)
Here is my hostbuilder:
var host = new HostBuilder() .ConfigureFunctionsWorkerDefaults() .ConfigureServices(s => { s.AddApplicationInsightsTelemetryWorkerService(); s.ConfigureFunctionsApplicationInsights(); s.AddLogging(); s.AddSingleton<IMyCustomInterface, MyCustomClass>(); }) .Build();
func start
generateserror CS1061: 'IServiceCollection' does not contain a definition for 'ConfigureFunctionsApplicationInsights' and no accessible extension method 'ConfigureFunctionsApplicationInsights' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?)
Here are the relevant packages from my .csproject
`
`
Commenting out the call to
ConfigureFunctionsApplicationInsights();
allows logging to work.Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.