philiphobgen
philiphobgen

Reputation: 2284

Trying to set environment in VSCode launch.json on OS X

I'm building an ASP.Net Core RC2 MVC Application on OS X I don't seem to be able to set my environment for development

I think I should be able to add within my launch.json file:

"env": {
  "ASPNETCORE_ENVIRONMENT": "Development"
}

I've tried adding it within the "name": ".NET Core Launch (web)" section. But "env" is not recognised. The version of the launch.json file is set as "version": "0.2.0", The error i get shown in the editor is Property env is not allowed

Has anyone got this working on OS X?

Thanks.

Upvotes: 1

Views: 1252

Answers (1)

Liam Dawson
Liam Dawson

Reputation: 1199

The issue is with OmniSharp for VS Code, as found at Issue #172 on their repo.

If you install their most recent preview release, the environment variable will work as intended. Download the VSIX file, and open it using the Open File dialog in VS Code. When the official release comes out, it will still suggest extension updates as per normal.

Upvotes: 1

Related Questions