I am using dotnet watch
command to run asp.net core project. However, by default, it is picking up the Production
as an environment.
I have tried both options using:
1) > dotnet watch ASPNETCORE_ENVIRONMENT=Development
2) > dotnet run ASPNETCORE_ENVIRONMENT=Development
But it still picks up production as an environment.
Note: In visual studio environment variable is set in project properties as Development by default and running from visual studio picks that variable.
Question is: How to run dotnet core project in development from command line using either?:
1) dotnet run
2) dotnet watch
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…