Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dot NET Core Hosting Environment for Visual Studio for Mac

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.

like image 623
Mitch Dart Avatar asked Oct 14 '25 08:10

Mitch Dart


1 Answers

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

like image 155
Mitch Dart Avatar answered Oct 17 '25 05:10

Mitch Dart