dotnet cheat sheet
Commandes générales
- dotnet --info
- dotnet --version
- dotnet --list-sdks
- dotnet --list-runtimes
- dotnet -h | --help
- dotnet <app.dll>
Commande new
- dotnet new list
- dotnet new search <mot>
- dotnet new <template> -n Nom
- dotnet new console
- dotnet new classlib
- dotnet new wpf
- dotnet new winforms
- dotnet new webapi
- dotnet new mvc
- dotnet new razor
- dotnet new blazorserver
- dotnet new nunit
- dotnet new xunit
- dotnet new gitignore
- dotnet new editorconfig
- dotnet new sln -n SolutionName
Command sln / solution
- dotnet sln list
- dotnet sln add <project>
- dotnet sln remove <project>
Command package
- dotnet restore
- dotnet list package
- dotnet add package <nom>
- dotnet remove package <nom>
- dotnet pack -c Release
- dotnet nuget push <file.nupkg>
Command build / run
- dotnet build
- dotnet build -c Release
- dotnet clean
- dotnet run
- dotnet run --project MonProjet.csproj
- dotnet run --urls "http://localhost:5000"
- dotnet publish -c Release -o ./publish
Command test
- dotnet test
- dotnet test -t
- dotnet test --filter "TestCategory=Unit"
- dotnet test -l trx
- dotnet test -l html
- dotnet test -e VAR=value
Command tool
- dotnet tool list
- dotnet tool list -g
- dotnet tool search <mot>
- dotnet tool install <outil>
- dotnet tool install -g <outil>
- dotnet tool update <outil>
- dotnet tool uninstall <outil>
- dotnet tool restore
- dotnet tool run <cmd>
Dev utilities
- dotnet dev-certs https --trust
- dotnet user-secrets init
- dotnet user-secrets set key value
- dotnet user-jwts create
- dotnet user-jwts print
Command watch
- dotnet watch
- dotnet watch run
- dotnet watch run --urls "http://localhost:3000"
- dotnet watch build
- dotnet exec app.dll
- dotnet sdk check