Omnisharp-vscode: launch.json should configure the "Environment" to be "development" for ASP.Net Core apps.

Created on 11 Apr 2016  路  8Comments  路  Source: OmniSharp/omnisharp-vscode

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.

Debugger Feature Request

Most helpful comment

Yup, looks we don't have code to process 'env'. Looks easy enough to add through.

All 8 comments

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.

Was this page helpful?
0 / 5 - 0 ratings