Disclaimer: I am a consultant at Amazon Web Services, and this is my personal blog. The opinions expressed here are solely mine and do not reflect the views of Amazon Web Services (AWS). Any statements made should not be considered official endorsements or statements by AWS.
While working with .NET Core, it sometimes makes your life easy if know a few important .NET CLI commands.
Here are some of the most commonly used .NET CLI commands.
You don't have to run dotnet restore because it's run implicitly by all commands that require a restore to occur, such as dotnet new, dotnet build, dotnet run, dotnet test, dotnet publish, and dotnet pack. To disable implicit restore, use the --no-restore option.
dotnet publish workdotnet publish compiles the application, reads through its dependencies specified in the project file, and publishes the resulting set of files to a directory.
dotnet run workdotnet build and then runs the app from the output directory bin/debug/netcoreapp3.1/MainApp.dlldotnet run = dotnet build + execute launch-profile commanddotnet run commandAssemblyName.exe.That's all 🙂