i tried create setup file using bootstrapper intended first run .net framework setup file , myapp.exe. after finishing project got final setup file, doesn't started after double click or pressing enter after selecting file. don't know wrong.
this program.cs
file:
using microsoft.tools.windowsinstallerxml.bootstrapper; namespace testingboot { class program:bootstrapperapplication { static void main(string[] args) { console.writeline("this tesing bootstrapper"); console.read(); } protected override void run() { throw new notimplementedexception(); } } }
and wix installation file here
<?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 upgradecode="46c265f4-3f60-4781-9ef6-db889c115d55" version="1.0.0.0"> <bootstrapperapplicationref id="managedbootstrapperapplicationhost" > <payload sourcefile="bootstrappercore.config" /> <payload sourcefile="c:\program files (x86)\wix toolset v3.7\sdk\microsoft.deployment.windowsinstaller.dll" /> </bootstrapperapplicationref> <variable name="launchtarget" value="[programfiles64folder]folder\exe name.exe"/> <chain> <packagegroupref id="netfx4full"/> <exepackage sourcefile="$(var.path)\testingboot.exe"/> </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="yes" permachine="yes" permanent="yes" vital="yes" name="dotnetfx40_full_x86_x64.exe" sourcefile="dotnetfx40_full_x86_x64.exe" detectcondition="versionnt64" /> </packagegroup> </fragment> <fragment> <componentgroup id="productcomponents" directory="installfolder"> <!-- todo: remove comments around component element , componentref below in order add resources installer. --> <!-- <component id="productcomponent"> --> <!-- todo: insert files, registry keys, , other resources here. --> <!-- </component> --> </componentgroup> </fragment> </wix>
and have changed assemblyname under host own assembly name testingboot.exe
in configuration file bootstrappercore.config
.
here bootstrappercore.config
file's contents:
<configuration> <configsections> <sectiongroup name="wix.bootstrapper" type="microsoft.tools.windowsinstallerxml.bootstrapper.bootstrappersectiongroup, bootstrappercore"> <section name="host" type="microsoft.tools.windowsinstallerxml.bootstrapper.hostsection, bootstrappercore" /> </sectiongroup> </configsections> <startup uselegacyv2runtimeactivationpolicy="true"> <supportedruntime version="v4.0" /> <supportedruntime version="v2.0.50727" /> </startup> <wix.bootstrapper> <host assemblyname="testingboot" > <supportedframework version="v4\full" /> </host> </wix.bootstrapper> </configuration>
it appears bootstrapperapplication assembly missing bootstrapperapplicationref
element. should note burn engine loads ba assembly directly. not launch executable. thus, bootstrapperapplication loaded, think you'll want to make following change:
<bootstrapperapplicationref id="managedbootstrapperapplicationhost" > <payload sourcefile="$(var.path)\testingboot.exe"/> <payload sourcefile="bootstrappercore.config" /> <payload sourcefile="c:\program files (x86)\wix toolset v3.7\sdk\microsoft.deployment.windowsinstaller.dll" /> </bootstrapperapplicationref>
that add testingboot.exe
bootstrapperapplication , if boostrappercore.config
file looks like:
<configuration> <configsections> <sectiongroup name="wix.bootstrapper" type="microsoft.tools.windowsinstallerxml.bootstrapper.bootstrappersectiongroup, bootstrappercore"> <section name="host" type="microsoft.tools.windowsinstallerxml.bootstrapper.hostsection, bootstrappercore" /> </sectiongroup> </configsections> <startup uselegacyv2runtimeactivationpolicy="true"> <supportedruntime version="v4.0" /> </startup> <wix.bootstrapper> <host assemblyname="testingboot"> <supportedframework version="v4\full" /> <supportedframework version="v4\client" /> </host> </wix.bootstrapper> </configuration>
then burn engine find assembly named testingboot
, load that. again, noted above, testingboot
loaded directly , run()
method called directly. main()
entry point skipped because burn engine not run assembly executable.
Comments
Post a Comment