In order to check if .NET framework is installed you can use this condition:
<Condition Message="This application requires .NET Framework">
<![CDATA[Installed OR NETFRAMEWORK20]]>
</Condition>
I don't understand why the two sub-conditions (Installed, NETFRAMEWORK20) are combined with an OR
operator, rather I would expect something like this where both conditions are combined with an AND
:
<![CDATA[Installed AND NOT NETFRAMEWORK20]]>
Where is my misunderstanding?
Because the <Condition>
element is a condition for the installer to continue (and the message is only used if the condition fails).
So, we want to continue running this installation if either:
If the <Condition>
was just NETFRAMEWORK20
, and someone had just uninstalled .NET Framework, and then tried to uninstall your package, the condition would fail and display the message "This application requires .NET Framework" - which would be very annoying.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With