wrong arch of some packages
Closed this issue · 4 comments
For example, the C# compiler in MSBuild/Current/Bin/Roslyn/csc.exe
is a arm64
executable currently. From the manifest file and listing files, it is in package Microsoft.CodeAnalysis.Compilers
which is a dependency of Microsoft.VisualStudio.Component.Roslyn.Compiler
"id": "Microsoft.VisualStudio.Component.Roslyn.Compiler",
"version": "17.11.35102.94",
"type": "Component",
"dependencies": {
"Microsoft.CodeAnalysis.Compilers": "[4.0,5.0.0.0)"
},
and the arch of the package is specified by productArch
:
"id": "Microsoft.CodeAnalysis.Compilers",
"version": "4.11.0.2442804",
"type": "Vsix",
"productArch": "arm64",
So, I believe we should match productArch
with host arch. Besides, there are chip
and machineArch
fields in the manifest file, and I failed to understand what are the exact meaning of them, e.g.
"id": "Microsoft.VisualStudio.ClientDiagnostics.Targeted",
"version": "17.11.35102.94",
"type": "Vsix",
"chip": "x64",
"productArch": "neutral",
"machineArch": "x64",
From #138, machineArch
should be host arch by default if it is not explicitly specified in dependencies.
{
"id": "Microsoft.VisualStudio.Debugger",
"productArch": "x64",
"dependencies": {
"Microsoft.VisualStudio.Debugger.Remote.DiagnosticsHub.Client": "[17.0,18.0)",
}
},
{
"id": "Microsoft.VisualStudio.Debugger.Remote.DiagnosticsHub.Client",
"productArch": "neutral",
"machineArch": "x64",
"dependencies": {
"Microsoft.VisualStudio.Debugger.Remote.DiagnosticsHub.Client": {
"machineArch": "x86"
}
}
},
{
"id": "Microsoft.VisualStudio.Debugger.Remote.DiagnosticsHub.Client",
"productArch": "neutral",
"machineArch": "x86",
},
Another observation from package:
"id": "Microsoft.VisualStudio.Debugger.Remote",
"type": "Vsix",
"chip": "x64",
"productArch": "neutral",
"machineArch": "arm64",
The package contains msvsmon.exe
, which runs on target machines to listen incoming connections from developer machines for remote debugging.
dumpbin /headers Contents/Common7/IDE/Remote%20Debugger/x64/vcruntime140.dll
AA64 machine (ARM64) (ARM64X)
dumpbin /headers Contents/Common7/IDE/Remote%20Debugger/x64/msvsmon.exe
8664 machine (x64)
My understanding is that the package must be running on arm64 machines, as vcruntime140.dll
is a Arm64X PE file.
As a comparasion, this package is a host package with machineArch:arm64
.
"id": "Microsoft.VisualCpp.Tools.HostARM64.TargetX64",
"type": "Vsix",
"machineArch": "arm64",
I made it complicated. Users know what architecture they want for a specific package. vsdownload
just need to offer a option to download user-specified arch, like --host-arch
proposed in PR #140.