VSCode and Dotnet Useful Commands

Dotnet (.net core, .net 5) useful commands:

dotnet --info
dotnet new sln
dotnet new webapi -o API
dotnet sln add APi
dotnet watch run
dotnet dev-certs https --trust
dotnet new gitignore

Visual Studio Code useful extensions:

  • C# from Microsoft
    (+ ^P assets)
  • C# Extensions from JosKreativ
  • Material Icon Theme from Philipp Kief

VS Code configuration:
– AutoSave
– Font Size
– Hide folders: Settings->Exclude “**/obj” “**/bin”
– Compact folders: Settings->”Compact folders”
– appsettings.Development.json: “Microsoft”: “Warning” -> “Microsoft”: “Information”
– launchSettings.json:
“launchBrowser”: true/false,
“launchUrl”

Git useful commands:

  • git init
  • create gitignore (dotnet new gitignore)
  • add appsettings.json to gitignore
  • [create git repo]
  • git commit -m “first commit”
  • git branch -M main
  • git remote add origin https://github.com/orgName/AppName.git
  • git push -u origin main