3

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>
3
  • 1
    according to this question your msbuild file looks good. Did you try to install it without copying the .net installation files? Commented May 27, 2012 at 20:03
  • @Wimmel Well, this is embarassing! It turns out it was adding the online installer in, all I had to do was not have the installation files present as you suggested. Commented May 27, 2012 at 21:11
  • Hi. can you tell me where exactly is this information located in documentation? I do not see any info about ItemGruo element? Is this not part of Wix? Commented Oct 22, 2012 at 12:52

3 Answers 3

2

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.

Sign up to request clarification or add additional context in comments.

Comments

1

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

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.