I have three configuration files, one for each environment:
- appsettings.json -> production
- appsettings.dev.json -> development
- appsettings.stg.json -> staging
If I set ASPNETCORE_ENVIRONMENT to dev, I get a runtime exception complaining about not being able to find appsettings.dev.json. I tried adding
"copyToOutput": [
"appsettings.dev.json"
]
to the buildOptions
section in project.json but it doesn't seem to have any effect.
Is there another way I can force appsettings.dev.json to be copied to the output directory?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…