Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
PowerShell script for installing/updating my dotnet CLI global tools
# Tool lists:
# https://github.com/aspnet/AspNetCore/blob/master/src/Tools/
# https://github.com/natemcmaster/dotnet-tools
$tools = @(
'dotnet-depends',
'dotnet-outdated',
'dotnet-format',
'dotnet-script',
'dotnet-symbol',
'dotnetsdkhelpers',
'gti',
'microsoft.web.librarymanager.cli')
foreach($tool in $tools) {
# Install if it doesn't exist
&dotnet tool install -g $tool
if($LastExitCode -eq 0) {
continue
}
# Upgrade if it was already installed
&dotnet tool update -g $tool
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.