How to update all of my dotnet global tool by one command
Asked Answered
S

4

7

I install too many dotnet tool but how to keey they in lastest version. I do not want to update them manual.

I find the github issus: Add dotnet tool update --all option · Issue #10130 · dotnet/sdk

Susurrus answered 19/2, 2020 at 5:0 Comment(0)
S
8

I write a tool that can update all dotnet tool

Installation

dotnet tool install --global dotnetCampus.UpdateAllDotNetTools 

Usage

dotnet updatealltools

dotnet-campus/dotnetCampus.UpdateAllDotNetTools: The dotnet tool that can update all dotnet tools

Susurrus answered 19/2, 2020 at 5:0 Comment(0)
G
4

you can also run this (linux)

dotnet tool list -g | awk '{ print $1 }' | tail +3 | xargs -I % sh -c 'dotnet tool update -g %;'

from: https://lab.steveoams.com/-/snippets/15

Gubernatorial answered 10/11, 2020 at 23:56 Comment(1)
Windows users, you can also use with Git bash if you have it installed (it comes with 'Git for windows' by default).Pronty
Z
2

There is also a dotnet change request on github with some powershell samples

https://github.com/dotnet/sdk/issues/10130

Zoubek answered 9/1, 2023 at 11:35 Comment(0)
P
0

There is a built-in command as of .NET 8.0.4xx

dotnet tool update --all

But there's an issue in 8.0.400 leading to a NullReferenceException

Paladin answered 21/8 at 10:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.