4

Trying out the new Visual Studio for Mac preview. Dotnet core mvc project compiles and runs perfectly :D:D:D

Only problem is; It uses the default Hosting environment: Production.

I have tried to put export ASPNETCORE_ENVIRONMENT=Development inside my bash profile and export it in my terminal.

Running dotnet in cli works fine with that environment but not in Visual Studio for Mac.

I can't seem to find where I can add the environment variable it should use when debugging.

Lex Li
  • 60,503
  • 9
  • 116
  • 147
Mitch Dart
  • 1,333
  • 1
  • 12
  • 33

1 Answers1

9

Ok I was being a bit of a moron.

You have to right click on the project and NOT the solution. - Options - Run Configurations Default - Environment Variables

Mitch Dart
  • 1,333
  • 1
  • 12
  • 33