visual studio - Can't get Wix custom action to work in Votive/VS2010 -


help! need execute managed custom action in wix 3.5 setup project , no matter i've tried can't work.

i'm using votive integration in visual studio 2010. wix product.wxs file unchanged visual studio template except few text changes:

<?xml version="1.0" encoding="utf-8"?> <wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <product id="666ffc07-90b2-4608-a9f0-a0cc879f2ad0" name="product name" language="1033" version="5.5.0002" manufacturer="tigra astronomy" upgradecode="d17a5991-b404-4095-9e93-08d2db984cfd">     <package installerversion="200" compressed="yes" />      <media id="1" cabinet="media1.cab" embedcab="yes" />      <directory id="targetdir" name="sourcedir">         <directory id="programfilesfolder">             <directory id="installlocation" name="directory name">                 <!-- todo: remove comments around component element , componentref below in order add resources installer. -->                 <!-- <component id="productcomponent" guid="3ea5ade7-9b7b-40da-9e83-13e066a000ef"> -->                     <!-- todo: insert files, registry keys, , other resources here. -->                 <!-- </component> -->             </directory>         </directory>     </directory>      <feature id="productfeature" title="ascom driver" level="1">         <!-- todo: remove comments around componentref element , component above in order add resources installer. -->         <!-- <componentref id="productcomponent" /> -->          <!-- note: following componentgroupref required pull in generated authoring project references. -->         <componentgroupref id="product.generated" />     </feature> </product> 

i have set reference managed custom action project, set harvest property true. project called wix.customactions , produces wix.customactions.dll , wix.customactions.ca.dll

i see wix processing reference during build , wix.customactions.dll assembly shows in binary table in final setup project, wix.customactions.ca.dll not.

i have customactions.wxs should package , invoke custom action:

    <?xml version="1.0" encoding="utf-8" ?>     <wix xmlns="http://schemas.microsoft.com/wix/2006/wi">   <fragment>     <binary id="driverregistrationca" sourcefile="$(var.wix.customactions.targetdir)\$(var.wix.customactions.targetname).ca.dll" />     <customaction id="registerdriver" binarykey="driverregistrationca" dllentry="registerascomdriver" execute="deferred" return="check" />     <customaction id="unregisterdriver" binarykey="driverregistrationca" dllentry="unregisterascomdriver" execute="immediate" return="check" />     <installexecutesequence>       <custom action="registerdriver" after="installfinalize" />       <custom action="unregisterdriver" before="removefiles" />     </installexecutesequence>   </fragment> </wix> 

i've looked @ various 'howto' sources on interweb , @ best confusing, contradictory advice. understand it, wix.customactions.ca.dll file unmanaged dll loads .net framework , passes control 'real' managed custom action. however, wix.customactions.ca.dll not packaged in msi file. i've followed examples best can can't see what's wrong.

please, has got working in votive? can give me actual working example?

you need reference (e.g., customactionref) product fragment; otherwise, it's discarded smart linker.


Comments