Description
Describe the bug
When running dotnet tool update -g --all
and some packages are already up to date, the message prints an empty ID.
Tool '' is already installed.
This is a follow-up issue blocked by #42598. That issue must be addressed before the problematic code path for this issue can be reached.
To Reproduce
(Assuming #42598 already fixed)
- Install any global dotnet tool. For example:
dotnet tool install csharprepl -g
- Immediately perform full global tools update:
dotnet tool update -g --all
- Observe that the CLI prints a message with an empty package ID in it
Exceptions (if any)
Not applicable
Analysis
This is caused by a new optimization where up-to-date packages are no longer reinstalled, introduced by 4a4823d. The newly added message is formatted with the package ID supplied in the command line, which would be null if --all
is supplied.
Further technical details
- Include the output of
dotnet --info
This is locally produced build from main branch.
.NET SDK: Version: 10.0.100-dev Commit: f271b05 Workload version: 10.0.100-manifests.2316105a MSBuild version: 17.12.0-preview-24407-03+6bc91d5e2Runtime Environment:
OS Name: Windows
OS Version: 10.0.22635
OS Platform: Windows
RID: win-x64
Base Path: E:\dotnet-sdk\artifacts\bin\redist\Debug\dotnet\sdk\10.0.100-dev\.NET workloads installed:
Configured to use loose manifests when installing new manifests.
[aspire]
Installation Source: VS 17.11.35222.181, VS 17.12.35209.166
Manifest Version: 8.0.1/8.0.100
Manifest Path: E:\dotnet-sdk\artifacts\bin\redist\Debug\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.0.1\WorkloadManifest.json
Install Type: FileBasedHost:
Version: 9.0.0-rc.1.24414.5
Architecture: x64
Commit: static.NET SDKs installed:
10.0.100-dev [E:\dotnet-sdk\artifacts\bin\redist\Debug\dotnet\sdk].NET runtimes installed:
Microsoft.AspNetCore.App 9.0.0-preview.7.24406.2 [E:\dotnet-sdk\artifacts\bin\redist\Debug\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.0-rc.1.24414.4 [E:\dotnet-sdk\artifacts\bin\redist\Debug\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.0 [E:\dotnet-sdk\artifacts\bin\redist\Debug\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.0 [E:\dotnet-sdk\artifacts\bin\redist\Debug\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.0 [E:\dotnet-sdk\artifacts\bin\redist\Debug\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.0-preview.7.24405.7 [E:\dotnet-sdk\artifacts\bin\redist\Debug\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.0-rc.1.24412.13 [E:\dotnet-sdk\artifacts\bin\redist\Debug\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.0-rc.1.24414.5 [E:\dotnet-sdk\artifacts\bin\redist\Debug\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 9.0.0-preview.7.24405.2 [E:\dotnet-sdk\artifacts\bin\redist\Debug\dotnet\shared\Microsoft.WindowsDesktop.App]Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]Environment variables:
DOTNET_ROOT [E:\dotnet-sdk\artifacts\bin\redist\Debug\dotnet]global.json file:
Not found
- The IDE (VS / VS Code/ VS4Mac) you're running on, and its version
CLI is capable of reproduction, no IDE required.