wix - Why does managed bootstrapper application always install .Net framework no matter the .net framework exists or not? -


if wixvariables wixmbaprereqpackageid , wixmbaprereqlicenseurl not added, fails compile.

the windows installer xml variable !(wix.wixmbaprereqpackageid) unknown.
windows installer xml variable !(wix.wixmbaprereqlicenseurl) unknown.

if 2 variables added, though test computer has .net framework 4.0 installed, bootstrapper installs .net framework 4.0 every time.

how avoid installing .net framework when target computer has .net framework?

below sample code.

<?xml version="1.0" encoding="utf-8"?> <wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/utilextension">     <bundle name="testbootstrapper" version="1.0.0.0" manufacturer="microsoft" upgradecode="e8c02687-b5fe-4842-bcc4-286c2800b556">     <bootstrapperapplicationref id='managedbootstrapperapplicationhost'>       <payload sourcefile='myba.dll' />     </bootstrapperapplicationref>      <!--<bootstrapperapplicationref id="wixstandardbootstrapperapplication.rtflicense" />-->          <chain>       <packagegroupref                 id="netfx4full"/>       <msipackage name="setupproject1.msi" sourcefile="data\setupproject1.msi" downloadurl="http://myserver/setupproject1.msi" compressed="no">       </msipackage>       <msipackage name="setupproject2.msi" sourcefile="data\setupproject2.msi" downloadurl="http://myserver/setupproject2.msi" compressed="no">       </msipackage>         </chain>     </bundle>    <fragment>     <wixvariable         id="wixmbaprereqpackageid"         value="netfx4full" />     <wixvariable         id="wixmbaprereqlicenseurl"         value="netfxlicense.rtf" />      <util:registrysearch         root="hklm"         key="software\microsoft\net framework setup\ndp\v4\full"         value="version"         variable="netfx4fullversion" />     <util:registrysearch         root="hklm"         key="software\microsoft\net framework setup\ndp\v4\full"         value="version"         variable="netfx4x64fullversion"         win64="yes" />      <packagegroup id="netfx4full">       <exepackage           id="netfx4full"           cache="no"           compressed="no"           permachine="yes"           permanent="yes"           vital="yes"           sourcefile="dotnetfx40_full_x86_x64.exe"           downloadurl="http://go.microsoft.com/fwlink/?linkid=164193"           detectcondition="netfx4fullversion , (not versionnt64 or netfx4x64fullversion)" />     </packagegroup>   </fragment> </wix> 

wix bootstrapper started framework installation default, when unable load mba. check simple message box mba loaded or not.

you can use below code in run() function ensure that.

    protected override void run()     {         this.engine.log(loglevel.verbose, "running testba.");         messagebox.show("mba loaded");         this.engine.quit(0);     } 

ensure have included mba class name in assembly info file.

[assembly: bootstrapperapplication(typeof(testba))] 

check bootstrapper log file in %temp% location find root cause of error.

i referred this example start bootstrapper application. may helpful you.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -