... user secrets without the package ref?
This commit is contained in:
parent
9936a3c80b
commit
0ed3f7c3f9
1 changed files with 7 additions and 2 deletions
|
|
@ -36,9 +36,14 @@ namespace test
|
||||||
// Set up configuration sources.
|
// Set up configuration sources.
|
||||||
|
|
||||||
var builder = new ConfigurationBuilder()
|
var builder = new ConfigurationBuilder()
|
||||||
.AddEnvironmentVariables()
|
|
||||||
.AddJsonFile("appsettings.json")
|
.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();
|
Configuration = builder.Build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue