AppSettings.json for Integration Test in ASP.NET Core
问题 I am following this guide. I have a Startup in the API project that uses an appsettings.json configuration file. public class Startup { public Startup(IHostingEnvironment env) { var builder = new ConfigurationBuilder() .SetBasePath(env.ContentRootPath) .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) .AddEnvironmentVariables(); Configuration = builder.Build(); Log.Logger = new LoggerConfiguration() .Enrich.FromLogContext() .ReadFrom.Configuration(Configuration)