Reputation:
Update: it turns out this is actually working, but the installation files were just by default being copied to the output directory. If the setup is run without them present it will just download files as necessary.
I've been reading through the documentation and followed the how to guide on installing the .NET framework in WiX, however the output of the build is very large as a result of the framework installation files being included (between 100mb and 200mb).
As I want to avoid such a large download size for end users, is it possible to make WiX use the online installer (http://www.microsoft.com/en-us/download/details.aspx?id=31) as opposed to making users who already have the framework have to download large setups?
Currently my markup is pretty much the exact same as in the documentation, but for reference to anyone who may need to see it it's as follows:
<ItemGroup>
<BootstrapperFile Include="Microsoft.Net.Framework.3.5">
<ProductName>.NET Framework 3.5</ProductName>
</BootstrapperFile>
<BootstrapperFile Include="Microsoft.Windows.Installer.3.1">
<ProductName>Windows Installer 3.1</ProductName>
</BootstrapperFile>
</ItemGroup>
<Target Name="AfterBuild">
<GenerateBootstrapper
ApplicationFile="$(TargetFileName)"
ApplicationName="Application Name"
BootstrapperItems="@(BootstrapperFile)"
ComponentsLocation="HomeSite"
CopyComponents="True"
OutputPath="$(OutputPath)"
Path="C:\Program Files (x86)\Microsoft SDKs\Windows\v6.0A\Bootstrapper\" />
</Target>
Upvotes: 3
Views: 2745
Reputation: 5230
As Sunil mentioned, perhaps the simplest way to do this is with a bootstrapper. Once you have your WiX bootstrapper working, all you need to do to add .Net 4.0 as a pre-requisite is..
a) Add a reference to the file WixNetFxExtension.dll into your Bootstrapper / managed Bootstrapper app project
b) Add the following as the first item in your chain..
<PackageGroupRef Id="NetFx40Web"/>
That's it!
The above downloads .net 4 over the internet if required. Further info and options here : wixnetfxextension documentation
Upvotes: 1
Reputation:
It turns out this is actually working, but the installation files were just by default being copied to the output directory. If the setup is run without them present it will just download files as necessary.
Upvotes: 2
Reputation: 4277
There are lots of bootstrappers available for binding setups. You can bind the web setup of .net framework with your s/w and then if the pre-requiste is not installed the tool will install .net framework.
I too had same requirement and i went for dotNetInstaller. It's a free tool.
Upvotes: 0