http://bugs.winehq.org/show_bug.cgi?id=58577
Bug ID: 58577 Summary: MsiGetComponentPath/MsiLocateComponent doesn't resolve a reference to .NET GAC Product: Wine Version: 10.12 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: msi Assignee: wine-bugs@winehq.org Reporter: peathot@hotmail.com Distribution: ---
Created attachment 79090 --> http://bugs.winehq.org/attachment.cgi?id=79090 Test application source code
Attached is a very simple program which call `MsiLocateComponentW()` to look for an MSI component which is a .NET assembly from Microsoft ReportViewer 2010 runtime. Under Windows 11, it produces the following output:
MsiLocateComponentW(...) returns 3 Returned path (119): C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.Common\10.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.Common.dll
However, on Wine, it produces this instead:
MsiLocateComponentW(...) returns 2 Returned path (158): <\Microsoft.ReportViewer.Common,version="10.0.0.0",publicKeyToken="b03f5f7f11d50a3a",proce ssorArchitecture="MSIL",fileVersion="10.0.30319.1",culture="neutral"
(3 = INSTALLSTATE_LOCAL, 2 = INSTALLSTATE_ABSENT)
Looking into the registry of both Windows 11 and Wine, the output of Wine is how it's stored in registry. So Windows must have an additional step which resolve this format of reference into a path in .NET GAC.
This is stumbled upon during a research about how `MsiProvideAssembly[A|W]()` can be implemented. I'll file another issue about that.
Microsoft ReportViewer 2010 runtime is obtained from https://www.hygeia-pharmacy.com/sources/reportviewer.zip [1]. The sha256sum of the _extracted_ file is:
sha256sum ReportViewer.exe e8ff182e202b321ac2b9245ee20c4eb659008ffb2a34cdbd3486f9da3d4c3e06 ReportViewer.exe
Once obtained, run the installer under a clean WINEPREFIX, then run my test program. The test program's source code is attached, as well as a precompiled version (for convenience). The full output with Wine's fixme's is also attached. On Windows 11, the pasted output consists of the entirety of the output.
[1]: yes, it's non-Microsoft link. For some reason I can't find this exact file on Microsoft website. If you prefer that this file be downloaded from Microsoft instead, I can find another version of this file from https://www.microsoft.com/en-in/download/details.aspx?id=27231 (you only need reportviewer.exe). The output of the program will be slightly different, and I haven't tested this version on Windows 11.
http://bugs.winehq.org/show_bug.cgi?id=58577
--- Comment #1 from Ratchanan Srirattanamet peathot@hotmail.com --- Created attachment 79091 --> http://bugs.winehq.org/attachment.cgi?id=79091 Test application, compiled using MSVC
http://bugs.winehq.org/show_bug.cgi?id=58577
--- Comment #2 from Ratchanan Srirattanamet peathot@hotmail.com --- Created attachment 79092 --> http://bugs.winehq.org/attachment.cgi?id=79092 Output of test application run under Wine