public SharedServerStartup(IWebHostEnvironment env) { var builder = new ConfigurationBuilder(); builder .SetBasePath(env.GetRootDir()) .AddJsonFile("appsettings.json", true, true) .AddJsonFile($"appsettings.{env.EnvironmentName}.json", true) .AddEnvironmentVariables(); _oConfiguration = builder.Build(); }
public Startup(IWebHostEnvironment env) { var builder = new ConfigurationBuilder(); builder .SetBasePath(env.GetRootDir()) .AddEnvironmentVariables() .AddJsonFile("appsettings.json", true, true) .AddJsonFile($"appsettings.{env.EnvironmentName}.json", true) .AddUserSecrets <Startup>() ; _oConfiguration = builder.Build(); // var oBuilder = new ConfigurationBuilder(); // oBuilder.AddUserSecrets<Startup>(); // InternalConfiguration = oBuilder.Build(); // Console.WriteLine(env.GetRootDir()); // Configuration.GetChildren().ToList().ForEach(t => Console.WriteLine(t.Key)); }