Cannot enumerate VS workloads on ARM64 (exception in `dotnet --info`)
See original GitHub issueDescription
When I run dotnet --info
on ARM64, I see an exception reported in the “.NET workloads installed:” section.
2023-03-28T12:51:38.3237539Z [05:51:38] Executing command: D:\agent\_work\1\s/artifacts/out\sdk\a64\dotnet.exe --info
2023-03-28T12:51:41.7432919Z .NET SDK:
2023-03-28T12:51:41.7434619Z Version: 8.0.100-preview.4.23178.2
2023-03-28T12:51:41.7435737Z Commit: 69e28735b9
2023-03-28T12:51:41.7439641Z
2023-03-28T12:51:41.7440492Z Runtime Environment:
2023-03-28T12:51:41.7630407Z OS Name: Windows
2023-03-28T12:51:41.7631930Z OS Version: 10.0.25124
2023-03-28T12:51:41.8878125Z OS Platform: Windows
2023-03-28T12:51:42.2820047Z RID: win10-arm64
2023-03-28T12:51:42.2821560Z Base Path: D:\agent\_work\1\s\artifacts\out\sdk\a64\sdk\8.0.100-preview.4.23178.2\
2023-03-28T12:51:42.2822263Z
2023-03-28T12:51:42.2824704Z .NET workloads installed:
2023-03-28T12:51:43.6104373Z System.BadImageFormatException: Retrieving the COM class factory for component with CLSID {177F0C4A-1CD3-4DE7-A32C-71DBBB9FA36D} failed due to the following error: 800700c1 is not a valid Win32 application. (0x800700C1).
2023-03-28T12:51:43.6107137Z at System.RuntimeTypeHandle.AllocateComObject(Void* pClassFactory)
2023-03-28T12:51:43.6108797Z at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
2023-03-28T12:51:43.6110303Z at Microsoft.DotNet.Workloads.Workload.VisualStudioWorkloads.GetVisualStudioInstances()
2023-03-28T12:51:43.6112107Z at Microsoft.DotNet.Workloads.Workload.VisualStudioWorkloads.GetInstalledWorkloads(IWorkloadResolver workloadResolver, InstalledWorkloadsCollection installedWorkloads, Nullable`1 sdkFeatureBand)
2023-03-28T12:51:43.6114059Z at Microsoft.DotNet.Workloads.Workload.List.WorkloadInfoHelper.AddInstalledVsWorkloads(IEnumerable`1 sdkWorkloadIds)
2023-03-28T12:51:43.6116528Z at Microsoft.DotNet.Cli.WorkloadCommandParser.ShowWorkloadsInfo(ParseResult parseResult, IWorkloadInfoHelper workloadInfoHelper, IReporter reporter, String dotnetDir)
2023-03-28T12:51:43.6118079Z at Microsoft.DotNet.Cli.CommandLineInfo.PrintInfo()
2023-03-28T12:51:43.6119496Z at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)
2023-03-28T12:51:43.6120800Z at Microsoft.DotNet.Cli.Program.Main(String[] args)
2023-03-28T12:51:43.6251950Z
2023-03-28T12:51:43.6254933Z Host:
2023-03-28T12:51:43.6256157Z Version: 8.0.0-preview.4.23176.4
2023-03-28T12:51:43.6257013Z Architecture: arm64
2023-03-28T12:51:43.6257807Z Commit: 8d5f520838
2023-03-28T12:51:43.6258217Z
2023-03-28T12:51:43.6259197Z .NET SDKs installed:
2023-03-28T12:51:43.6260140Z 8.0.100-preview.4.23178.2 [D:\agent\_work\1\s\artifacts\out\sdk\a64\sdk]
2023-03-28T12:51:43.6260679Z
2023-03-28T12:51:43.6261395Z .NET runtimes installed:
2023-03-28T12:51:43.6262677Z Microsoft.AspNetCore.App 8.0.0-preview.4.23176.6 [D:\agent\_work\1\s\artifacts\out\sdk\a64\shared\Microsoft.AspNetCore.App]
2023-03-28T12:51:43.6264167Z Microsoft.NETCore.App 8.0.0-preview.4.23176.4 [D:\agent\_work\1\s\artifacts\out\sdk\a64\shared\Microsoft.NETCore.App]
2023-03-28T12:51:43.6265648Z Microsoft.WindowsDesktop.App 8.0.0-preview.4.23175.4 [D:\agent\_work\1\s\artifacts\out\sdk\a64\shared\Microsoft.WindowsDesktop.App]
2023-03-28T12:51:43.6266431Z
2023-03-28T12:51:43.6267080Z Other architectures found:
2023-03-28T12:51:43.6267809Z None
2023-03-28T12:51:43.6268101Z
2023-03-28T12:51:43.6268773Z Environment variables:
2023-03-28T12:51:43.6269462Z Not set
2023-03-28T12:51:43.6269747Z
2023-03-28T12:51:43.6270407Z global.json file:
2023-03-28T12:51:43.6271070Z Not found
2023-03-28T12:51:43.6271387Z
2023-03-28T12:51:43.6272003Z Learn more:
2023-03-28T12:51:43.6272715Z https://aka.ms/dotnet/info
2023-03-28T12:51:43.6273076Z
2023-03-28T12:51:43.6273748Z Download .NET:
2023-03-28T12:51:43.6274507Z https://aka.ms/dotnet/download
Reproduction Steps
Invoke dotnet --info
on an ARM64 machine. Appears to be new in 8.0-preview3.
Expected behavior
No exception. Maybe no workload readout on ARM64 hardware if we don’t expect that to work?
Actual behavior
Exception is reported in the “.NET workloads installed:” section of dotnet --info
output.
System.BadImageFormatException: Retrieving the COM class factory for component with CLSID {177F0C4A-1CD3-4DE7-A32C-71DBBB9FA36D} failed due to the following error: 800700c1 is not a valid Win32 application. (0x800700C1).
This CLSID appears to be related to the Visual Studio installer, and is probably being used to report some information about VS workloads installed on the machine.
(Full stack trace in issue description above.)
Regression?
As far as I can tell, this worked in 8.0-preview2 and before.
Known Workarounds
No response
Configuration
.NET 8.0 Preview 4 ARM64
Other information
No response
Issue Analytics
- State:
- Created 6 months ago
- Comments:7 (5 by maintainers)
Top GitHub Comments
Installing VS 17.5 fixed this entirely.
Looks like the VS install on this machine is 16.11 (no VS 2022 at all).
I also have these VCRedist packages (the hope was that the highlighted one would fix this):
I admit that running net8.0 on ARM64 machine with only pre-ARM VS might be an, umm, rare use case.