You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
当项目引入SkyWalking并设置了环境变量: Environment.SetEnvironmentVariable("ASPNETCORE_HOSTINGSTARTUPASSEMBLIES", "SkyAPM.Agent.AspNetCore");
调用builder.Host.UseAgileConfig()会报错: System.InvalidOperationException:“Unable to resolve service for type 'Microsoft.Extensions.Hosting.IHostEnvironment' while attempting to activate 'SkyApm.Agent.Hosting.HostingEnvironmentProvider'.”
但如果使用以下方式是可以正常使用的,麻烦看下如何处理 builder.Host.ConfigureAppConfiguration((context, config) => { var configClient = new ConfigClient(); config.AddAgileConfig(configClient); });
The text was updated successfully, but these errors were encountered:
gudieaofei
changed the title
builder.Host.UseAgileConfig会与SkyWalking冲突
builder.Host.UseAgileConfig与SkyWalking不兼容
Oct 12, 2022
gudieaofei
changed the title
builder.Host.UseAgileConfig与SkyWalking不兼容
builder.Host.UseAgileConfig()与SkyWalking不兼容
Oct 12, 2022
当项目引入SkyWalking并设置了环境变量:
Environment.SetEnvironmentVariable("ASPNETCORE_HOSTINGSTARTUPASSEMBLIES", "SkyAPM.Agent.AspNetCore");
调用builder.Host.UseAgileConfig()会报错:
System.InvalidOperationException:“Unable to resolve service for type 'Microsoft.Extensions.Hosting.IHostEnvironment' while attempting to activate 'SkyApm.Agent.Hosting.HostingEnvironmentProvider'.”
但如果使用以下方式是可以正常使用的,麻烦看下如何处理
builder.Host.ConfigureAppConfiguration((context, config) => { var configClient = new ConfigClient(); config.AddAgileConfig(configClient); });
The text was updated successfully, but these errors were encountered: