... user secrets without the package ref?

This commit is contained in:
2019-01-05 16:02:34 +00:00
parent c0c10be2cb
commit f93edb80a2

View File

@ -36,9 +36,14 @@ namespace test
// Set up configuration sources.
var builder = new ConfigurationBuilder()
.AddEnvironmentVariables()
.AddJsonFile("appsettings.json")
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true);
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
.AddEnvironmentVariables();
if (env.IsDevelopment())
{
// For more details on using the user secret store see http://go.microsoft.com/fwlink/?LinkID=532709
builder.AddUserSecrets();
}
Configuration = builder.Build();
}