title: WiX bootstrapper disable .NET Framework installation chaining
body: <p>In my WiX installer, I do not want .NET installed automatically if it isn't installed.  It should just give a warning or merely error out.</p>
  
  <p>The reason to avoid it is <a href="http://www.wrightfully.com/part-2-of-writing-your-own-net-based-installer-with-wix-creating-the-projects-in-visual-studio/" rel="nofollow noreferrer">explained here</a>:</p>
  
  <blockquote>
    <p>One HUGE word of
    caution here:  Because the .Net installer will technically be part of
    your install chain, if the user installs .Net but then cancels your
    install, your installer will still be listed in the Add/Remove
    programs since one if it’s components (the .Net installer) completed. 
    Tread with caution.</p>
  </blockquote>
  
  <p>He seems to be intentionally including it.  But I'm not and I happened to set <code>&lt;supportedRuntime version="v4.5" /&gt;</code> which I guess isn't a real version (4.5 => 4.0 as far as this is concerned?).  My WiX managed bootstrapper application exe automatically prompted me to download and install the "missing" .NET Framework.</p>
  
  <p>For computers that ARE missing 4.0, I don't want this to happen.  WiX also complains if I leave out:</p>
  
  <pre><code>&lt;WixVariable Id="WixMbaPrereqLicenseUrl" Value="..." /&gt;
  &lt;WixVariable Id="WixMbaPrereqPackageId" Value="..." /&gt;
  </code></pre>
  
  <p>in which I literally leave in <code>...</code> because I don't want it to work anyway.</p>
  
  <p><a href="http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Unknown-WiX-variables-in-Bundle-with-WiX-3-6-1908-0-td6574163.html" rel="nofollow noreferrer">In this thread</a>, @Shruthi asks </p>
  
  <blockquote>
    <p>Is there a way to replace the prerequisite .Net install UI with just an notification to the user that they need to install a particular version of .Net before they can install the bundle?</p>
  </blockquote>
  
  <p>And Rob Mensching replies: </p>
  
  <blockquote>
    <p>Yes, that is possible now.</p>
  </blockquote>
  
  <p>... BUT HE DOESN'T ELABORATE.  <em>How</em> is it possible now? </p>
  
  <p>Thanks!</p>
  
  <p>===============</p>
  
  <p>In my Bundle's Bootstrap.Config:</p>
  
  <pre><code>&lt;startup useLegacyV2RuntimeActivationPolicy="true"&gt;
      &lt;supportedRuntime version="v6" /&gt;  &lt;!-- Pretending it's the future! --&gt;
  &lt;/startup&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/zqNjk.png" alt="WiX bootstrap stub window?"></p>
  
  <p>The Bundle itself does not reference any .NET stuff and does not reference <code>WixNetFxExtension</code> and uses the custom <code>&lt;BootstrapperApplicationRef Id="ManagedBootstrapperApplicationHost" /&gt;</code></p>