Repository navigation
Closed
Labels
Description
Describe the bug
Attempting to install a .NET local tool with the .NET 8 RC2 SDK apparently succeeds, but then when trying to run the tool the command fails and the user is prompted to run dotnet tool install.
$ dotnet tool restore
Skipping NuGet package signature verification.
Tool 'docfx' (version '2.72.0') was restored. Available commands: docfx
Restore was successful.
$ dotnet docfx --version
Run "dotnet tool restore" to make the "docfx" command available.
To Reproduce
A self-contained repro repository using GitHub Actions can be found at https://github.com/martincostello/docfx-dotnet-8-repro.
Exceptions (if any)
None.
Further technical details
$ dotnet --info
.NET SDK:
Version: 8.0.100-rc.2.23502.2
Commit: 0abacfc2b6
Runtime Environment:
OS Name: ubuntu
OS Version: 22.04
OS Platform: Linux
RID: linux-x64
Base Path: /usr/share/dotnet/sdk/8.0.100-rc.2.23502.2/
.NET workloads installed:
There are no installed workloads to display.
Host:
Version: 8.0.0-rc.2.23479.6
Architecture: x64
Commit: 0b25e38ad3
.NET SDKs installed:
6.0.416 [/usr/share/dotnet/sdk]
7.0.113 [/usr/share/dotnet/sdk]
7.0.203 [/usr/share/dotnet/sdk]
7.0.310 [/usr/share/dotnet/sdk]
7.0.403 [/usr/share/dotnet/sdk]
8.0.100-rc.2.23502.2 [/usr/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.24 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.5 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.13 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.0-rc.2.23480.2 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.24 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.5 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.13 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.0-rc.2.23479.6 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
None
Environment variables:
DOTNET_ROOT [/usr/share/dotnet]
global.json file:
/home/runner/work/docfx-dotnet-8-repro/docfx-dotnet-8-repro/global.json
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
Activity
martincostello commentedon Oct 28, 2023
Also appears to fail with a global tool: error.
martincostello commentedon Oct 29, 2023
Also tried
dotnet tool run docfxand runningdotnet tool restorea second time and neither work.Running
dotnet tool --listafter restore shows it is installed:martincostello commentedon Oct 30, 2023
For my specific use case I've been able to workaround the issue by executing the tool directly from where it's restored to:
baronfel commentedon Oct 30, 2023
Hey @martincostello - thanks for reporting. I see this is on Ubuntu - have you seen similar behavior on any other platforms?
martincostello commentedon Oct 30, 2023
Looks like it's broken for macOS and Windows too in GitHub Actions: workflow run.
baronfel commentedon Oct 30, 2023
bizarre - at least on Windows docfx works for me on rc2, and Ubuntu 23.10 on WSL similarly worked on a 'install'. Yet the workflows you have clearly show failure.
JL03-Yue commentedon Oct 30, 2023
@martincostello Could you try running without
dotnetwhen running the tool? I'm looking into the problemmartincostello commentedon Oct 30, 2023
No dice: https://github.com/martincostello/docfx-dotnet-8-repro/actions/runs/6698425577
dsplaisted commentedon Oct 30, 2023
This look like it's probably caused by this RC2 known issue: https://github.com/dotnet/core/blob/main/release-notes/8.0/known-issues.md#-80100-rc2-dotnet-tool-restore-will-always-install-the-latest-version-of-a-specific-tool
The repro specifies version 2.72.0 of the tool, but because of the bug the SDK restores the latest available version (2.72.1) instead. But then when the SDK goes to run the tool it is looking for 2.72.0 and can't find it. A workaround would be to update the tools manifest to use the latest version of the tool (2.72.1 right now).
martincostello commentedon Oct 30, 2023
I'll try that now, but I think I opened this issue before the .1 release shipped on Friday, and then when I saw there was a newer version available I updated Polly and rebased my branch for .NET 8 there and it was still broken.
martincostello commentedon Oct 30, 2023
Yep, that was it. It's fixed now.
Must have been a very unfortunate sequence of timing that meant the new docfx release came out just as I fixed the issues we had in that branch and then I must not have rebased it to include the tool update in that branch until after I'd applied the workaround I posted earlier.
marcpopMSFT commentedon Oct 31, 2023
Thanks for confirming. Closing as fixed.