Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

dotnet run, dotnet build vs Start without debugging(Ctrl-F5)

From docs.microsoft.com:

dotnet build - Builds a project and all of its dependencies.

dotnet run - Runs source code without any explicit compile or launch commands.

Does Ctrl+F5 imply both of the above? To achieve the same results with Ctrl+F5, what do I have to run?

like image 821
Unknown developer Avatar asked Apr 29 '18 16:04

Unknown developer


1 Answers

dotnet build will only build the project without actually running it.

dotnet run will automatically build the project using dotnet build if necessary. You can disable this by running dotnet run --no-build.

If you launch a project from within Visual Studio without debugging, then that will be mostly equivalent to dotnet run, although it depends a bit on the project type what exactly is called. Usually, building inside Visual Studio will invoke MSBuild directly, without relying on dotnet.

like image 102
poke Avatar answered Oct 08 '22 08:10

poke