3
votes

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.

1
Just to add to the original answer: In my case, I had to restart visual studio for the environment variables to work. - unicornslayer

1 Answers

8
votes

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