Dotnet Core CLI useful commands


 .NET Core command-line interface (CLI) is a cross-platform toolchain for developing, building, running, and publishing .NET Core applications. It comes handy when using Visual Studio Code (lightweight IDE for developers) 

Basic Commands :

  • new - create new item based on template.
dotnet new [console|classlib|web|mvc|angular|react|webapi]
  • build - build the solution or project
dotnet build
  • clean - clean the output directory of the project.
  • publish - publish the application and it dependencies to folder for deployment
  • run - start the application or project
  • sln - lists or modify solution file, for e.g. adding or deleting a project 
dotnet sln add <project_files>

dotnet sln remove <project_files> 

  • test - dotnet test driver to execute unit tests
  • help - to get more detailed information on any command

Comments

Popular posts from this blog

Top VS Code Extension for React Developers

Setup Docker Engine on Windows using WSL2

GitHub Copilot with GPT-4o vs Cursor with Claude Sonnet 3.7: A Developer's Perspective