Skip to main content

Cross platform .NET command line tools for .NET Core.

# To initialize a new .NET project:
dotnet new <template_short_name>

# To restore nuget packages:
dotnet restore

# To build and execute the .NET project in the current directory:
dotnet run

# To run a packaged dotnet application (only needs the runtime, the rest of the commands require the .NET Core SDK installed):
dotnet <path/to/application.dll>

# ---

# To show available templates:
dotnet new --list

# To add package reference to the project in the current folder:
dotnet add package <package_name>

# To remove a package reference from the project in the current folder:
dotnet remove package <package_name>

# To add a specific package version reference to the project in the current folder:
dotnet add package <package_name> -v <version>

# To create a nuget package for the project in current folder:
dotnet pack

# To install a new project template:
dotnet new --install <dotnet_template_name>

# To remove a project template:
dotnet new --uninstall <dotnet_template_name>

# To run a test defined in current folder project
dotnet test

# To build the current's folder solution or project:
dotnet build

# To build the current's folder solution or project with release configuration:
dotnet build -c Release

# To publish artifacts for current's folder solution or project:
dotnet publish