Why is AspNet 6 Application always running in Production Mode

Question: I just upgraded Asp.Net 5 Application to Asp.Net 6, when I run the command 
dotnet watch run

The application always starts in the Production Mode, why is that?

Answer: You should be able to run the Asp.Net 6 in Development mode by typing the following command.
dotnet watch run --ASPNETCORE_ENVIRONMENT=Development

The command above should start the Application in the Development Mode and be able to debug from there.

- I hope this helps you.

Edit this Article
AspNet6 always running in Production mode aspnet 6 aspnet6 ebook e-book .NET 6 published
Was this page helpful?
Yes Yes! this solution to the problem was helpful. No No! this solution to the problem was not helpful.. Leave ErnesTech Feedback.Feedback
If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.

Your Session is Ending
Login to Continue

© 2021 - ErnesTech - Privacy