Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What causes a 1723 DLL not found error in a WIX installer

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.

like image 609
Purplegoldfish Avatar asked May 07 '13 09:05

Purplegoldfish


2 Answers

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.

like image 54
Hille Avatar answered Nov 20 '22 08:11

Hille


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.

like image 1
user190650 Avatar answered Nov 20 '22 09:11

user190650