I found the blog I was looking for: http://blogs.msdn.com/jasongin/archive/2008/05/23/custom-action-project-temp lates.aspx
In that blog entry, he shows this: <Fragment> <Binary Id="MyCustomAction.dll" SourceFile="$(var.CAProjectName.TargetDir)$(var.CAProjectName.TargetName).CA .dll" /> <CustomAction Id="MyCustomAction" BinaryKey="MyCustomAction.dll" DllEntry="CAMethodName" Execute="immediate" /> </Fragment> -----Original Message----- From: Oscar Newkerk [mailto:osc...@unifysquare.com] Sent: Friday, August 14, 2009 6:02 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Custom Actions That was the error. I was including the wrong DLL. However the Thanks Oscar -----Original Message----- From: Blair [mailto:os...@live.com] Sent: Friday, August 14, 2009 3:21 PM To: 'General discussion for Windows Installer XML toolset.' Subject: Re: [WiX-users] Custom Actions Your entry point wasn't exported in the DLL you packaged: http://blogs.msdn.com/heaths/archive/2006/08/14/determine-if-the-custom-acti on-function-is-exported.aspx Turns out with DTF projects that you can't reference the right DLL to use using the <Binary SourceFile="$(var.ProjectName.TargetPath)" ... pattern. You need to instead use <Binary SourceFile="$(var.ProjectName.TargetDir)ProjectName.CA.dll" ... pattern. I hope this gets "fixed" in some future release... In your case, even though you are not using the project reference variables, you still used the wrong DLL. You should change your Binary tag as follows (you need the .CA before the .dll in your SourceFile): <Binary Id='RegisterScriptCA' SourceFile='C:\Users\oscarn\Documents\Visual Studio 2008\Projects\BusyOnBusy\BusyOnBusy\RegisterScriptCA\bin\Debug\RegisterScrip tCA.CA.dll'/> This should work. -----Original Message----- From: Oscar Newkerk [mailto:osc...@unifysquare.com] Sent: Friday, August 14, 2009 2:15 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Custom Actions I'm trying to use a custom action in my setup and getting an error when the MSI runs. The custom action is a DLL written in C# using the Visual Studio template for custom actions. It's not executing correctly when I run the setup. Any suggestions as to what I'm doing wrong? The entry point looks like: [CustomAction] public static ActionResult CustomAction1(Session session) { _session = session; _session.Log("Begin RegisterScriptCA"); bool status = RegisterSIPApplication(); if (status) { return ActionResult.Success; } else { return ActionResult.Failure; } } The custom action is defined as: <Fragment> <CustomAction Id='RegisterScript' BinaryKey='RegisterScriptCA' DllEntry='CustomAction1' Execute='immediate' Impersonate='yes' Return='check'/> <Binary Id='RegisterScriptCA' SourceFile='C:\Users\oscarn\Documents\Visual Studio 2008\Projects\BusyOnBusy\BusyOnBusy\RegisterScriptCA\bin\Debug\RegisterScrip tCA.dll'/> </Fragment> And included in the product.wxs file as: <InstallExecuteSequence> <Custom Action='RegisterScript' After='InstallFiles'/> </InstallExecuteSequence> The Wix package builds OK, but when I run the install, I get an error when it tries to invoke the custom action: Action 14:05:01: RegisterScript. Action start 14:05:01: RegisterScript. Error 1723. 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. Action RegisterScript, entry: CustomAction1, library: C:\WINDOWS\Installer\MSIB7.tmp MSI (s) (5C:EC) [14:05:06:332]: Product: -- Error 1723. 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. Action RegisterScript, entry: CustomAction1, library: C:\WINDOWS\Installer\MSIB7.tmp Action ended 14:05:06: RegisterScript. Return value 3. Action ended 14:05:06: INSTALL. Return value 3. Thanks Oscar ---------------------------------------------------------------------------- -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ---------------------------------------------------------------------------- -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users