microsoft / winget-pkgs

The Microsoft community Windows Package Manager manifest repository
MIT License
8.69k stars 4.52k forks source link

[Package Issue]: Microsoft.VCRedist.2005.x64 incorrectly identifies as x86 #162060

Open seangibbz opened 3 months ago

seangibbz commented 3 months ago

Please confirm these before moving forward

Category of the issue

Side-By-Side installation.

Brief description of your issue

When looking to install Microsoft Visual C++ 2005 Redistributable, winget offers both .x86 and .x64 packages.

PS > winget search --source winget --id Microsoft.VCRedist.2005

Name                                            Id                          Version
-------------------------------------------------------------------------------------
Microsoft Visual C++ 2005 Redistributable       Microsoft.VCRedist.2005.x86 8.0.61001
Microsoft Visual C++ 2005 Redistributable (x64) Microsoft.VCRedist.2005.x64 8.0.61000

However, the .x64 package ID is not correctly retained upon installation of Microsoft.VCRedist.2005.x64. Instead, the installed package identifies using the ID Microsoft.VCRedist.2005.x86.

This also affects update detection, as x86 and x64 have different available versions.

Steps to reproduce

Install Microsoft Visual C++ 2005 Redistributable (x64)

winget install -e --source winget --id Microsoft.VCRedist.2005.x64

Check for details of installed package

winget list --source winget --id Microsoft.VCRedist.2005

Actual behavior

While the package Name is correct, the package ID incorrectly uses the .x86 architecture identifier.

PS > winget list --source winget --id Microsoft.VCRedist.2005

Name                                            Id                          Version   Available
-----------------------------------------------------------------------------------------------
Microsoft Visual C++ 2005 Redistributable (x64) Microsoft.VCRedist.2005.x86 8.0.61000 8.0.61001

Installing Microsoft.VCRedist.2005.x86 if Microsoft.VCRedist.2005.x64 is already installed will overwrite the x64 version (8.0.61000) with the x86 version (8.0.61001).

Installing the x64 version after the x86 version will result in a duplicate entry in winget for the package ID Microsoft.VCRedist.2005.x86.

PS > winget list --source winget --id Microsoft.VCRedist.2005

Name                                            Id                          Version
-------------------------------------------------------------------------------------
Microsoft Visual C++ 2005 Redistributable       Microsoft.VCRedist.2005.x86 8.0.61001
Microsoft Visual C++ 2005 Redistributable (x64) Microsoft.VCRedist.2005.x86 8.0.61000

Expected behavior

Installed package ID should use the .x64 architecture identifier

PS > winget list --source winget --id Microsoft.VCRedist.2005

Name                                            Id                          Version   Available
-----------------------------------------------------------------------------------------------
Microsoft Visual C++ 2005 Redistributable (x64) Microsoft.VCRedist.2005.x64 8.0.61000 8.0.61000

Installing the x86 version should not override an already-installed x64 version. Installing both versions should result in different package ID entries.

PS > winget list --source winget --id Microsoft.VCRedist.2005

Name                                            Id                          Version   Available
-----------------------------------------------------------------------------------------------
Microsoft Visual C++ 2005 Redistributable       Microsoft.VCRedist.2005.x86 8.0.61001
Microsoft Visual C++ 2005 Redistributable (x64) Microsoft.VCRedist.2005.x64 8.0.61000 8.0.61000

Environment

Windows Package Manager v1.8.1791
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22631.3810
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.23.1791.0

Winget Directories
-----------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages
Installer Downloads                %USERPROFILE%\Downloads

Links
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Enabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled
ProxyCommandLineOptions                   Disabled
DefaultProxy                              Disabled

Screenshots and Logs

No response

stephengillie commented 3 months ago

I believe this might be an issue with the application and installer, not quite the package manager. But this is why the old advice was "just install both architectures", to solve still needing the DLL, and also the "upgrade always available" situation.