psj01
psj01

Reputation: 3245

where does ASPNETCORE_ENVIRONMENT comes from if i have it in both launch.json and launchSettings.json file for a dotnet core app

It looks by default the ASPNETCORE_ENVIRONMENT is defined in two places for a dotnet core mvc application that's created using the dotnet new command.

Why is this defined in both places? does one override the other?

Upvotes: 0

Views: 356

Answers (1)

Edward
Edward

Reputation: 30036

Based on your description, you are testing in VS Code instead of VS.

launchSettings.json is used to configure .net core project no matter whether it is in VS Code.

launch.json is specific to VS Code which is used to run .net core when launching from VS Code.

The settings from launch.json will override the value from launchSettings.json.

Upvotes: 1

Related Questions