Reputation: 5284
I'm working with a WIX installer and keep getting this error message:
WIX Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run.
Are there any other issues that would cause the 1723 error which are not related to the DLL not being found?
I can say with 100% certainty that the DLL has to be found because previous custom actions in the same installer work and they all use the same DLL.
I had this error before and solved it by renaming the custom action so I assumed it was related to the length of the name allowed for the custom action. This time I have tried both a shorter name and a name the exact length of other working custom actions and still get this error.
I have investigated causes of 1723 and the most common one seems to be that the installer fails to unpack the DLL due to access rights. Although this is very unlikely as other custom actions in the same file referencing the same DLL work fine I have ensured that the folder the installer is trying to access has full access for this user, also I am running the installer from a command prompt in administrator mode so we should have no issues there.
Upvotes: 5
Views: 5712
Reputation: 395
In my case, I had to compile the CustomActions project first and then compile the Setup project.
Upvotes: 0
Reputation: 20020
For me, it was a renaming of the custom action method. I changed one letter from lower case to upper case and forgot to change it in the XML as well.
Upvotes: 0
Reputation: 303
We'e spent months to address bloody error 1723
.
After decompilation by dumpbin /Exports CustomAction.CA.dll
(runnable from visual studio developer tools), there are sorted entries in following manner:
121 78 000039DE Dev*****************
122 79 000039F4 DML*****************
123 80 00003A0A DoN*****************
Assuming that sorting should be done using ASCII it looks like this is incorrect. Big letter M
should be before small letter e
thus entries 121
and 122
should be replaced.
We've reproduced that issue on Wix 3.9 R2 however on some Windows 7 Ultimate virtual machines issue didn't occur but was reproducible on Windows 7 Enterprise.
For us solution was to change in CustomAction project, name of CustomAction from DML********* to DmL******** making sorting works correctly.
PS: I was trying to give that feedback directly on WiX webpage, however I couldn't register.
Upvotes: 1
Reputation: 11
I got this error lately and the issue was a DLL dependency. My DLL had other DLL dependencies which were present on my development machine and were not on the target machine were I saw the error. You can check your dependencies with the Dependency Walker http://www.dependencywalker.com to find out if this is the case. That certainly helped me.
Upvotes: 1
Reputation: 4196
WIX 3.x (more specifically MakeSfxCA) has a known bug of possibly producing incorrect native dll files leading to an error "1723". The bug is triggered depending on the names of the custom actions (the methods decorated with the "CustomAction" attribute).
If you have two custom actions having the same prefix the one followed by a lower case, the other followed by an upper case letter (coming later in the alphabet), you may run into the "1723" error. E.g. two custom actions named "isactive" and "isBlocked" are troublesome.
This has to do with MakeSfxCA incorrectly sorting the entry points of exported methods.
Cf. http://wixtoolset.org/issues/4502 for WIX's issue and Adding a new Custom Action to a project prevents an existing Custom Action from being run for more technical details.
Upvotes: 4
Reputation: 412
I beat my head against the wall for weeks with this very same problem. My solution came in not only renaming the custom action method name but renaming the id in the CustomAction
.
<CustomAction Id="CA_InstallerDll.install"
BinaryKey="B_CustomAction_CA"
DllEntry="Install_InstallerDll"
Execute="deferred"
Return="check"
Impersonate="no"/>
...to...
<CustomAction Id="CA_DllInstaller.install" //changed InstallerDll to DllInstaller
BinaryKey="B_CustomAction_CA"
DllEntry="Install_DllInstaller" //Changed the CA Method name too
Execute="deferred"
Return="check"
Impersonate="no"/>
I'm not sure if this is what you meant by "renaming the custom action" but this is what fixed it for me. The other frustrating thing was that even if I went and renamed it back to InstallerDll
, it would still fail for the same reason.
Upvotes: 0