by JasonRShaver
16. May 2009 16:58
To get your Visual Studio 2008 WiX install project to create one of those 'Setup.exe' bootstrapper programs that auto-downloads the correct .NET Framework and stuff, add the following to your .wixproj file:
<ItemGroup>
<BootstrapperFile Include="Microsoft.Net.Framework.3.5">
<ProductName>Microsoft .NET Framework 3.5</ProductName>
</BootstrapperFile>
<BootstrapperFile Include="Microsoft.Windows.Installer.3.1">
<ProductName>Windows Installer 3.1</ProductName>
</BootstrapperFile>
</ItemGroup>
<Target Name="Bootstrapper" Inputs="$(OutDir)$(TargetFileName)"
Outputs="$(OutDir)\Setup.exe" Condition=" '$(OutputType)'=='package' ">
<GenerateBootstrapper ApplicationName="MyProductName" ApplicationFile="$(TargetFileName)"
BootstrapperItems="@(BootstrapperFile)" ComponentsLocation="HomeSite"
OutputPath="$(OutputPath)" Culture="en-US" />
</Target>
<PropertyGroup>
<BuildDependsOn>$(BuildDependsOn);Bootstrapper</BuildDependsOn>
</PropertyGroup>
It does not matter where you put it in the *.wixproj file as long as it is inside the Project tag.
8635b7e9-48b2-416a-8e75-d89dd58f8338|0|.0
Tags:
Blog