简体   繁体   中英

“Ambiguous Match Found” Error 1001 in MSI Windows Installer

I'm working on upgrading an application from .NET 3.5 to .NET 4.0 , eventually 4.6 , which is currently crashing during the install process. I changed a lot when re-syntaxing the old Managed C++ code into C++/CLI, but ~95% of the other C# files haven't been touched, other than the .NET settings. The code has also moved from VS 2010 to VS 2015 , and the target machine has moved from 32-bit Windows 7 to 64-bit Windows 10.

Running my new installer on the target machine produces the following error box:

Error 1001: An exception has occurred during the Commit phase of the installation. This exception will be ignored and the installation will continue. --> Ambiguous Match Found.

The past couple Error 1001's have been regarding differences in the .NET versions, and required changes to the code. The messages were also more specific about which files were in question.

I was able to get logfiles for both the working and new version. They have similarities, but one line that stands out that's not present in the older log is:

MSI (s) (6C:A4) [11:17:04:754]: WIN64DUALFOLDERS: Substitution in 'C:\\Program Files (x86)\\FOLDER' folder had been blocked by the 1 mask argument (the folder pair's iSwapAttrib member = 0).

I'm wondering if this is related or not, a good number of these lines appear and then the logs look different from there. I'm not even positive if the issue is with the code, or something like a setup problem with the installer projects. Does anyone have any ideas on where to look from here?

Error 1001 is nearly always the downstream result of a custom action failure, so it's going to be a code failure, load failure, something like that. Either way it requires debugging the code path or loading of your code. These managed code custom actions are not loaded in the "normal" way. They are instantiated using reflection, some version of the runtime will be loaded, and some things like automatic loading of config files won't work. In an Everyone install they run with the System account. These all have downstream effects that can cause failures of code that works in a normal user loading environment (which being a Dll called by msiexec.exe is not).

The dual folders entry isn't related. You haven't posted the architecture of your setup project, but 32-bit setup projects can't install to the 64-bit ProgramFiles folder. With 64-bit setup projects you probably want to be using ProgramFiles64Folder, CommonFiles64Folder etc.

Edit: Ambiguous Match Found might be a reflection error related to locating installer class types.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM