Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'm not quite sure why you're having problems, but I just had the same task, and it (now ;-) works as intended. That is, it installs <a href="http://en.wikipedia.org/wiki/.NET_Framework">.NET</a> 4.5 only if required, and won't do a .NET uninstall when uninstalling the bootstrapper as a whole.</p> <p>However, .NET 4.5 <strong>can</strong> be uninstalled individually, which I think is good.</p> <p>This is what I used (most probably derived from other Stack&nbsp;Overflow posts):</p> <pre><code>&lt;PackageGroup Id="Netfx45Xxx"&gt; &lt;ExePackage Id="Netfx45Xxx" Cache="no" Compressed="no" PerMachine="yes" Permanent="yes" Vital="yes" InstallCommand="/q" SourceFile="C:\wixtest\dotnetfx45_full_x86_x64.exe" DetectCondition="(Netfx4FullVersion=&amp;quot;4.5.50709&amp;quot;) AND (NOT VersionNT64 OR (Netfx4x64FullVersion=&amp;quot;4.5.50709&amp;quot;))" InstallCondition="(VersionNT &gt;= v6.0 OR VersionNT64 &gt;= v6.0) AND (NOT (Netfx4FullVersion=&amp;quot;4.5.50709&amp;quot; OR Netfx4x64FullVersion=&amp;quot;4.5.50709&amp;quot;))"/&gt; &lt;/PackageGroup&gt; </code></pre> <p>The strange thing is that you already have Permanent="yes", which indeed is key to keeping .NET on uninstall.</p> <p>One difference is that I have no explicit "NOT REMOVE" in the InstallCondition, maybe that is more confusing than helpful to Windows Installer...?</p> <p>I am using WiX 3.7.1224.0, which currently is the latest.</p> <hr> <p>One comment to TheESJ's answer: even with the predefined PackageGroupRef, you can supply a local file to avoid downloading. Simply place it in a "redist" folder below your bootstrapper EXE file, and it will be taken from there if present without downloading. I found this behaviour yesterday via the log file after a faulty install.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload