Use WixNetFxExtension properties as DetectCondition

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Use WixNetFxExtension properties as DetectCondition

bwehking
This post has NOT been accepted by the mailing list yet.
Hello,

I'm using Wix 3.10 and I am looking for a future proof way of checking for .NET framework from a bootstrapper application. My idea was to use properties from the WixNetFxExtension in a DetectCondition for a ExePackage like this:

<ExePackage DisplayName="Microsoft .NET Framework 4.5.1"
                  SourceFile="Modules\NDP451-KB2858728-x86-x64-AllOS-ENU.exe"                  
                  DetectCondition="WIX_IS_NETFRAMEWORK_451_OR_LATER_INSTALLED=&quot;1&quot;"
                  InstallCommand="/passive /norestart"
                  Permanent="yes"
                  Name="NET Framework 4.5.1\NDP451-KB2858728-x86-x64-AllOS-ENU.exe"
                  SuppressSignatureVerification="yes">
        <ExitCode Behavior="scheduleReboot" />
</ExePackage>

I added the reference to the extension dll and I added the corresponding namespace to my Bundle.wxs, but the above DetectCondition always evaluates to false. Is there a smarter way? Or what am I doing wrong? Is something like a <PropertyRef> required, as it is for a MSI project?

Thanks in advance!

Bernd
Loading...