What Causes Error 1154 in WiX

Credit: www.joyofsetup.com

Recently, as I was working on one of our installers, I had a very strange issue crop up. This particular installer is fairly complicated, but also fairly stable.  It has many managed custom actions, and I was merely adding some functionality to it. I was testing the installer and ran into an 1154 error:

“There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run.“

That’s fine. This happens. It’s pretty common, actually.

  • Check the names in the custom action declaration.  Do they match the DLL and method name, including case?
  • Are you trying to run a 64bit DLL using a 32bit installer?
  • Are you running MakeSfxCA.exe correctly with the most recent version of the DLL and installer?
  • Does the method you’re trying to call have the correct signature?

[CustomAction]Public static ActionResult MyCustomAction(Session session){….}

In this case, my problem action was, let’s say, HereIsMyCA. I checked through all of the above items several times. Most confusing was that other custom actions from the same DLL worked just fine. One might say I was getting a bit frustrated.  Eventually, I changed the name of the action and method – ThisIsAwfulPleaseWork.

…and it did.

After some experimentation I discovered that the problem lay in the capitalization of the C# method.  HereIsMyCA was breaking, but HereIsMyCa was fine. Most other methods with similar capitalization (several capitals in a row) worked fine. I’ve had one other method break. There is no rhyme or reason to it, but I hope that I save someone some hours with my discovery.

Related posts: