title: Install .NET framework using online setup in WiX
body: <p><strong>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.</strong></p>
  
  <p>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).</p>
  
  <p>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?</p>
  
  <p>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:</p>
  
  <pre><code>  &lt;ItemGroup&gt;
      &lt;BootstrapperFile Include="Microsoft.Net.Framework.3.5"&gt;
        &lt;ProductName&gt;.NET Framework 3.5&lt;/ProductName&gt;
      &lt;/BootstrapperFile&gt;
      &lt;BootstrapperFile Include="Microsoft.Windows.Installer.3.1"&gt;
        &lt;ProductName&gt;Windows Installer 3.1&lt;/ProductName&gt;
      &lt;/BootstrapperFile&gt;
    &lt;/ItemGroup&gt;
    &lt;Target Name="AfterBuild"&gt;
      &lt;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\" /&gt;
    &lt;/Target&gt;
  </code></pre>