Things like connection strings, user-secrets, etc, are often store in evironment specific app._environment_.json settings. We should make the default experience launch in the "Development" environment.
How do we do that?
I'm not entirely sure - I _thought_ that setting the command line arguments, so that they make it into the call to UseDefaultHostingConfiguration, in the template's Program.cs would work, but it didn't seem to in my quick trial.
@davidfowl - do you know the right way to do this?
@davidfowl @BillHiebert, is there a way that VS Code can launch the target app to use the devolper environment.json file?
I think as in the example here, adding
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
to the launch.json is supposed to set environment variables, but it's not working for launch configurations of type "coreclr" at the moment.
Yup, looks we don't have code to process 'env'. Looks easy enough to add through.
+1 this would be great for ASP.NET projects.
This is fixed internally and will be available in our 1.1.* releases.
Most helpful comment
Yup, looks we don't have code to process 'env'. Looks easy enough to add through.