If a package id is blank skip it.
Otherwise you get a dotnet tool update -g
PS R:\test> dotnet updatealltools
Starting update all dotnet tools
Finding installed tools
dotnet tool list -g
Microsoft Windows [Version 10.0.18363.900]
(c) 2019 Microsoft Corporation. All rights reserved.
R:\test>dotnet tool list -g&exit
Package Id Version Commands
------------------------------------------------------------------------------
cake.tool 0.37.0 dotnet-cake
dotnetcampus.updatealldotnettools 1.0.0 dotnet-updatealltools
electronnet.cli 7.30.2 electronize
microsoft.cst.applicationinspector.cli 1.2.46 appinspector
nbgv 3.0.26 nbgv
powershell 6.2.3 pwsh
project2015to2017.migrate2017.tool 4.1.2 dotnet-migrate-2017
project2015to2017.migrate2019.tool 4.1.2 dotnet-migrate-2019
dotnet tool update cake.tool -g
Microsoft Windows [Version 10.0.18363.900]
(c) 2019 Microsoft Corporation. All rights reserved.
R:\test>dotnet tool update cake.tool -g&exit
Tool 'cake.tool' was successfully updated from version '0.37.0' to version '0.38.4'.
dotnet tool update dotnetcampus.updatealldotnettools -g
Microsoft Windows [Version 10.0.18363.900]
(c) 2019 Microsoft Corporation. All rights reserved.
R:\test>dotnet tool update dotnetcampus.updatealldotnettools -g&exit
Tool 'dotnetcampus.updatealldotnettools' failed to update due to the following:
Failed to uninstall tool package 'dotnetcampus.updatealldotnettools': Access to the path 'C:\Users\ssi\.dotnet\tools\.store\dotnetcampus.updatealldotnettools\1.0.0' is denied.
dotnet tool update electronnet.cli -g
Microsoft Windows [Version 10.0.18363.900]
(c) 2019 Microsoft Corporation. All rights reserved.
R:\test>dotnet tool update electronnet.cli -g&exit
Tool 'electronnet.cli' was successfully updated from version '7.30.2' to version '9.31.2'.
dotnet tool update microsoft.cst.applicationinspector.cli -g
Microsoft Windows [Version 10.0.18363.900]
(c) 2019 Microsoft Corporation. All rights reserved.
R:\test>dotnet tool update microsoft.cst.applicationinspector.cli -g&exit
Tool 'microsoft.cst.applicationinspector.cli' was reinstalled with the latest stable version (version '1.2.46').
dotnet tool update nbgv -g
Microsoft Windows [Version 10.0.18363.900]
(c) 2019 Microsoft Corporation. All rights reserved.
R:\test>dotnet tool update nbgv -g&exit
Tool 'nbgv' was successfully updated from version '3.0.26' to version '3.2.31'.
dotnet tool update powershell -g
Microsoft Windows [Version 10.0.18363.900]
(c) 2019 Microsoft Corporation. All rights reserved.
R:\test>dotnet tool update powershell -g&exit
Tool 'powershell' was successfully updated from version '6.2.3' to version '7.0.3'.
dotnet tool update project2015to2017.migrate2017.tool -g
Microsoft Windows [Version 10.0.18363.900]
(c) 2019 Microsoft Corporation. All rights reserved.
R:\test>dotnet tool update project2015to2017.migrate2017.tool -g&exit
Tool 'project2015to2017.migrate2017.tool' was successfully updated from version '4.1.2' to version '4.1.3'.
dotnet tool update project2015to2017.migrate2019.tool -g
Microsoft Windows [Version 10.0.18363.900]
(c) 2019 Microsoft Corporation. All rights reserved.
R:\test>dotnet tool update project2015to2017.migrate2019.tool -g&exit
Tool 'project2015to2017.migrate2019.tool' was successfully updated from version '4.1.2' to version '4.1.3'.
dotnet tool update -g
Microsoft Windows [Version 10.0.18363.900]
(c) 2019 Microsoft Corporation. All rights reserved.
R:\test>dotnet tool update -g&exit
Usage: dotnet tool update [options] <PACKAGE_ID>
Arguments:
<PACKAGE_ID> The NuGet Package Id of the tool to update.
Options:
-g, --global Update the tool in the current user's tools directory.
--tool-path <PATH> The directory containing the tool to update.
--local Update the tool and the local tool manifest.
--configfile <FILE> The NuGet configuration file to use.
--add-source <SOURCE> Add an additional NuGet package source to use during the update.
--framework <FRAMEWORK> The target framework to update the tool for.
--version <VERSION> The version range of the tool package to update to.
--tool-manifest <PATH> Path to the manifest file.
--disable-parallel Prevent restoring multiple projects in parallel.
--ignore-failed-sources Treat package source failures as warnings.
--no-cache Do not cache packages and http requests.
--interactive Allows the command to stop and wait for user input or action (for example to complete authentication).
-h, --help Show command line help.
-v, --verbosity <LEVEL> Set the MSBuild verbosity level. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic].
Specify one tool Package Id to update.
Update finished
PS R:\test>