Last active
November 7, 2023 15:58
-
-
Save tillig/029d5294a4a50ce0ab0fd1e08322b5d0 to your computer and use it in GitHub Desktop.
PowerShell script for installing/updating my dotnet CLI global tools
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tool lists: | |
# https://github.com/aspnet/AspNetCore/blob/master/src/Tools/ | |
# https://github.com/natemcmaster/dotnet-tools | |
$tools = @( | |
'dotnet-counters', | |
'dotnet-depends', | |
'dotnet-dump', | |
'dotnet-format', | |
'dotnet-guid', | |
'dotnet-outdated-tool', | |
'dotnet-script', | |
'dotnet-svcutil', | |
'dotnet-symbol', | |
'dotnet-trace', | |
'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