dotnetcore / dotnetcore/AgileConfig
builder.Host.UseAgileConfig()与SkyWalking不兼容
Open
- Dominant language
- C#
- Stars
- 1.6k
- Forks
- 324
- Avg merge
- 1d 19m
- Merged PRs (30d)
- 6
Description
当项目引入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);
});`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.