Hey guys, I'm running into some really strange behavior with managed Custom
Actions (C#) and DTF's compilation (?) of them. I've made a few WIX
installers before, all with C# Custom Actions, and never run into this
before, so I think I've covered all the basics and it's got me really
scratching my head.

I've got a WIX (3.8) installer project and a C# (.NET 4.5) Custom Action
project. I didn't do anything fancy, just added the projects in Visual
Studio (2012). I did a bunch of dialog/UI stuff in WIX before adding some
custom actions to do input validation, and the dialog scheduling and
everything seemed fine. Now, I'm seeing off and on invalid DLL errors when
the installer tries to load the Custom Action DLL. The error popup message
says "There is a problem with this Windows Installer package. A DLL
required for this install to complete could not be run. Contact your
support personnel or package vendor." Checking the log, it has the same
message, but with error number 1723 (I ran msiexec with "/l*v"). The error
comes up when the first Custom Action is scheduled to run, on
Publish/DoAction of a button. The weird thing is that depending on the
names/number of Custom Actions I have defined, it either works or doesn't.

Right now, I have six methods marked with the CustomAction attribute:
SetDisplayStates, ValidateServiceAccountDialog, ValidateServerConfigDialog,
ValidateLocalServerInstance, ValidateSearchProvidersDialog, and
SQLServerValidate. None of these do anything, they just return
ActionResult.Success. Everything compiles, and it looks like DTF is finding
the custom action entry points and packaging files correctly based on the
build output. But as soon as the first CA is scheduled to run, I get the
error popup. If I comment out _any_ of them and rebuild, the DLL loads fine
(only one is being referenced by the WIX xml code). If I significantly
change the names of all the methods (e.g. "Validate1", "Validate2", etc),
the DLL loads fine. I've been adding/removing/renaming methods all day and
can't figure out why sometimes the DLL is loadable and sometimes it isn't.
All the DLL exports seem to be there (I checked DumpBin and
DependencyWalker). What the heck is going on?
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to