I use WIX 3.8 for my application and it needs .NET Framework 3.5 SP1 to be installed as prerequisite in the machine.
I do a check for the .net Framework inside the bundle.wxs and when executed, I face the below problems.
1. The bootstrapper always tries to install the .net framework even though the supported runtime versions defined in the config file is v3.5.
2. On accepting and continuing the installation, the boostrapper fails to load and the setup abrupts.
From the log file, I see that the condition on the Detect condition is successful when tested in a machine with .net 3.5 SP1 already installed. But it exits with the message : "The prerequisites were already installed. The bootstrapper application will not be reloaded to prevent an infinite loop."
Can anyone let me know why is the BootStrapper always trigger the .net framework even though already installed in the machine?
Attaching the code snippet of the .net check as well as the config file changes:
<PackageGroup Id="Netfx35Full" >
<ExePackage Id="Netfx35Full" DisplayName="Microsoft .NET Framework 3.5" Cache="no" Compressed="yes" PerMachine="yes" Permanent="yes" Vital="no" SourceFile='..\prereq\dotnetfx35setup.exe' InstallCommand='/q /norestart'
RepairCommand="/q /norestart" UninstallCommand="/q /norestart" InstallCondition="(NOT Netfx35FullVersion AND Netfx35FullVersion < v3.5.30729.1)
AND (NOT Netfx35x64FullVersion AND Netfx35x64FullVersion < v3.5.30729.1) AND NOT Netfx4FullVersion OR NOT Netfx4x64FullVersion " DetectCondition="(Netfx35FullVersion AND Netfx35FullVersion >= v3.5.30729.1) OR (Netfx35x64FullVersion AND Netfx35x64FullVersion >= v3.5.30729.1) OR Netfx4FullVersion OR Netfx4x64FullVersion"/>
</PackageGroup>
Config file
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v3.5" />
</startup>
<wix.bootstrapper>
<host assemblyName="SCM.BootstrapperApplication">
<supportedFramework version="v3.5" />
</host>
</wix.bootstrapper>