ASP.NET CLI Tool

 Dotnet provides a CLI tool called "dotnet"

  • This CLI tool is used for creating, restoring packages, buidling and publishing .NET applications
  • Can be used to create, build and run .NET projects
  • Can be used to manage dependencies, including adding, removing and updating packages
  • It can be easily automated and itegrated into building and deployment pipelines
CLI command structure
dotnet <command> <argument> <option>

Here 'dotnet' is the driver and 'command' can sometiems be refered to as verb

e.g. dotnet new console myConsoleApp 

* 'dotnet --help' lists all the commands

list of commands: (to be postfixed to dotnet)

  add               Add a package or reference to a .NET project.

  build             Build a .NET project.

  build-server      Interact with servers started by a build.

  clean             Clean build outputs of a .NET project.

  format            Apply style preferences to a project or solution.

  help              Show command line help.

  list              List project references of a .NET project.

  msbuild           Run Microsoft Build Engine (MSBuild) commands.

  new               Create a new .NET project or file.

  nuget             Provides additional NuGet commands.

  pack              Create a NuGet package.

  publish           Publish a .NET project for deployment.

  remove            Remove a package or reference from a .NET project.

  restore           Restore dependencies specified in a .NET project.

  run               Build and run a .NET project output.

  sdk               Manage .NET SDK installation.

  sln               Modify Visual Studio solution files.

  store             Store the specified assemblies in the runtime package store.

  test              Run unit tests using the test runner specified in a .NET pro

Comments