-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Describe the bug
When I attempt to run the libman tool command from microsoft.web.librarymanager.cli v2.1.161 it fails with the dotnet host executable from .NET SDK 6 or 7, but succeeds with 5. The workaround I have been able to perform is to install the .NET 5 SDK, backup the dotnet binary from /usr/local/share/dotnet (I just cp dotnet dotnet-5), install the .NET 6 SDK, then rm dotnet and cp dotnet-5 dotnet. This allows the command to run successfully.
To Reproduce
Install the .NET 5 SDK:
ebrown@ebrown WebApp % dotnet tool install microsoft.web.librarymanager.cli --version 2.1.161 && dotnet libman restore
You can invoke the tool from this directory using the following commands: 'dotnet tool run libman' or 'dotnet libman'.
Tool 'microsoft.web.librarymanager.cli' (version '2.1.161') was successfully installed. Entry is added to the manifest file /Users/ebrown/Documents/repos/[APPLICATION_FOLDER]/WebApp/.config/dotnet-tools.json.
Restoring library foundation-sites@6.6.3...
Restoring library font-awesome@5.15.2...
Restoring library bootstrap@4.6.0...
Restoring library admin-lte@2.4.18...
Restoring library jquery@2.2.0...
Restoring library jquery-validation@1.14.0...
Restoring library jquery-validation-unobtrusive@3.2.12...
Restoring library datatables.net@1.10.24...
Restoring library datatables.net-bs@1.10.24...
Restoring library datatables.net-buttons@1.7.0...
Restoring library datatables.net-buttons-bs@1.7.0...
Restoring library require.js@2.3.6...
Restoring library jquery-placeholder@2.3.1...
Restoring library jquery-mask-plugin@1.14.16...
Restore completed. Files already up-to-date
Install the .NET 6 SDK:
ebrown@ebrown WebApp % dotnet tool install microsoft.web.librarymanager.cli --version 2.1.161 && dotnet libman restore
You can invoke the tool from this directory using the following commands: 'dotnet tool run libman' or 'dotnet libman'.
Tool 'microsoft.web.librarymanager.cli' (version '2.1.161') was successfully installed. Entry is added to the manifest file /Users/ebrown/Documents/repos/[APPLICATION_FOLDER]/WebApp/.config/dotnet-tools.json.
Failed to initialize CoreCLR, HRESULT: 0x80004005
Exceptions (if any)
Failed to initialize CoreCLR, HRESULT: 0x80004005
I have attached the trace files (COREHOST_TRACE=1) for all three runs, the only change I have made to any files is to replace the name of my application with [APPLICATION_FOLDER_NAME] in 5 paths in each file:
- SDK: .NET 5.0.406; Host from: .NET 5.0.406: sdk-5.dotnet-5.private.txt
- SDK: .NET 6.0.201; Host from: .NET 5.0.406: sdk-6.dotnet-5.private.txt
- SDK: .NET 6.0.201; Host from: .NET 6.0.201: sdk-6.dotnet-6.private.txt
Further technical details
The result of dotnet --info is identical regardless of which dotnet command is in play:
ebrown@ebrown WebApp % dotnet --info
.NET SDK (reflecting any global.json):
Version: 5.0.406
Commit: 3a48fd6fe5
Runtime Environment:
OS Name: Mac OS X
OS Version: 12.2
OS Platform: Darwin
RID: osx-x64
Base Path: /usr/local/share/dotnet/sdk/5.0.406/
Host (useful for support):
Version: 6.0.3
Commit: c24d9a9c91
.NET SDKs installed:
3.1.410 [/usr/local/share/dotnet/sdk]
3.1.411 [/usr/local/share/dotnet/sdk]
5.0.301 [/usr/local/share/dotnet/sdk]
5.0.302 [/usr/local/share/dotnet/sdk]
5.0.403 [/usr/local/share/dotnet/sdk]
5.0.406 [/usr/local/share/dotnet/sdk]
6.0.201 [/usr/local/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.16 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.17 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.7 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.8 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.12 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.15 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.3 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.0.9 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.28 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.8 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.16 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.17 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.7 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.8 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.12 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.15 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.3 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
I also have a global.json that I use for all the runs:
{
"sdk": {
"version": "5.0.406",
"rollForward": "disable"
}
}