I am trying to setting up multiple environments in my .NET Core 2.0 application. See my code below.
\"configuratio
You can update your launchsettings.json to include a 'Development' profile and then run:
dotnet run --launch-profile "Development"
For further details on configuration of the launchSettings.json file see Working with multiple environments
Note that the commandName would probably need to be "Project" (I haven't really tried this much). Example launchSettings.json as follows:
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:19882/",
"sslPort": 0
}
},
"profiles": {
"Development": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}