I have read this question but now that we also have 4.5 the solution won't work.
How can I check if the runtime is above 4.0?
Since it's a string I am guessing I cannot do:
<DefineConstants Condition=" '$(TargetFrameworkVersion)' >= 'v4.0' ">NET_4_0</DefineConstants>
So should I define both:
<DefineConstants Condition=" '$(TargetFrameworkVersion)' == 'v4.0' ">NET_4_0</DefineConstants>
<DefineConstants Condition=" '$(TargetFrameworkVersion)' == 'v4.5' ">NET_4_5</DefineConstants>
Is there a more generic solution?