var configuration = new ConfigurationBuilder() .AddJsonFile(Path.Combine(AppContext.BaseDirectory, "appsettings.json")) .Build();
需要添加 nuget 包 Microsoft.Extensions.Configuration,Microsoft.Extensions.Configuration.Json
var configuration = new ConfigurationBuilder() .AddJsonFile(Path.Combine(AppContext.BaseDirectory, "appsettings.json")) .Build();
需要添加 nuget 包 Microsoft.Extensions.Configuration,Microsoft.Extensions.Configuration.Json