I\'m creating an installer for a Windows desktop app, which has a dependency on another product that requires .NET 3.5
When installing this on Windows 10, .NET 3.5 is in
WiX Samples: Some potentially helpful links in general:
- WiX Quick Start Suggestions (with sample links).
- https://helgeklein.com/blog/2014/09/real-world-example-wix-msi-application-installer/
Alternative Tools: Maybe keep in mind that commercial tools have features that are easier to use to get your product out there quickly. WiX is great though.
Prerequisites: I would suggest you add a LaunchCondition to the package to abort installation if the .NET framework is not there. You can bundle the .NET framework with your application, but I really do not recommend that: Outdated prerequisites in packages.
LaunchCondition: The concept of LaunchConditions checks for a certain condition to be true before installation is allowed to continue:
Quick, inline sample:
<Condition Message="The .NET Framework 2.0 must be installed">
Installed OR NETFRAMEWORK20
</Condition>
WiX and .NET Framework: Some built-in measures to detect the .NET framwork.
Link:
Not sure whether this is the correct way but you can try a custom action with the following command
dism.exe /online /enable-feature /featurename:NetFx3
You can get a list of all available features by dism /online /get-features
if you want to try other windows features.
There is a way to install .NET 3.5 on Windows 10 and the latest Windows Server: to update a group policy value that will allow to download .NET 3.5 (blog post).
...open the command prompt and type "gpedit". The "Local Computer Policy Editor" opens where we can locate the necessary setting under the "Computer Configuration" > "Administrative Templates" > "System". On the left side, under "Settings", we can find a setting named "Specify settings for optional component installation and component repair" This is what we are going to modify. Let's open it and check "Enabled" and then check the second option – "Download repair content and optional features directly from Windows Update instead of Windows Server Update Services (WSUS)" and click "OK": Now, if we retry adding the .NET Framework 3.5, we can see that it succeeds...
I personally then revert this policy setting to its original value, if it was different.