Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Compiler consant for minimum framework version
<Project>
<!--
neeeds to be in Directory.Build.targets to be included
after SDK's TargetFrameworkIdentifier/-Version inference
-->
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NetCoreApp'
and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '5.0'))">
<DefineConstants>$(DefineConstants);AT_LEAST_NET5_0</DefineConstants>
</PropertyGroup>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment