Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any way to run .net core web app without debug mode?

I am developing a asp.net core web application in visual studio 2015 update 3.

Every time i have to check for the update in browser i have to either F5 the app which takes time or if i run "start without debugging" i get build error of unable to access "aspnet core identity dll" that is used by some process.

In asp.net mvc app i could just build app and then check in browser without having to F5 or Ctrl F5 which takes time.

Is there any way i could just make changes in code then just build app and check in browser rather than to run in debug mode ?

like image 857
knowledgeseeker Avatar asked Feb 02 '17 07:02

knowledgeseeker


People also ask

How can I run code without debugging?

The Debug: Run (Start Without Debugging) action is triggered with Ctrl+F5 and uses the currently selected launch configuration.

How do I run a .NET core application?

You can run it, from the console, by calling dotnet run from the folder that contains the project. json file. On your local machine, you can prepare the application for deployment by running "dotnet publish". This builds the application artifacts, does any minification and so forth.


1 Answers

Microsoft created a "watch" tool that you can add to your project.json which enables you to start the backend code in "watch mode"...

  1. Add Microsoft.DotNet.Watcher.Tools to the tools section of the project.json file.
  2. Run dotnet restore.
  3. Run with dotnet watch run
  4. Check the link above for further details

Then for your frontend code you can do as suggested by Michel Amorosa

like image 115
nover Avatar answered Oct 26 '22 19:10

nover