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?
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With