|
41 | 41 | </PropertyGroup>
|
42 | 42 |
|
43 | 43 | <PropertyGroup>
|
44 |
| - <LangVersion>8.0</LangVersion> |
| 44 | + <LangVersion>9.0</LangVersion> |
45 | 45 | </PropertyGroup>
|
46 | 46 |
|
47 |
| - <PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'"> |
48 |
| - <DefineConstants>$(DefineConstants);SUPPORTS_HASHCODE</DefineConstants> |
49 |
| - </PropertyGroup> |
50 |
| - <PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'"> |
51 |
| - <DefineConstants>$(DefineConstants);SUPPORTS_HASHCODE</DefineConstants> |
52 |
| - </PropertyGroup> |
53 |
| - <PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.1'"> |
54 |
| - <DefineConstants>$(DefineConstants);SUPPORTS_HASHCODE</DefineConstants> |
55 |
| - </PropertyGroup> |
| 47 | + <!-- Define target framework specific constants. |
| 48 | + https://apisof.net/ |
| 49 | + +===================+=======+==========+=====================+=============+=================+====================+==============+=========+============|===============| |
| 50 | + | SUPPORTS | MATHF | HASHCODE | EXTENDED_INTRINSICS | SPAN_STREAM | ENCODING_STRING | RUNTIME_INTRINSICS | CODECOVERAGE | HOTPATH | CREATESPAN | BITOPERATIONS | |
| 51 | + +===================+=======+==========+=====================+=============+=================+====================+==============+=========|============|===============| |
| 52 | + | >=netcoreapp3.1 | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | |
| 53 | + | netcoreapp2.1 | Y | Y | Y | Y | Y | N | Y | N | Y | N | |
| 54 | + | netcoreapp2.0 | Y | N | N | N | N | N | Y | N | Y | N | |
| 55 | + | netstandard2.1 | Y | Y | N | Y | Y | N | Y | N | Y | N | |
| 56 | + | netstandard2.0 | N | N | N | N | N | N | Y | N | N | N | |
| 57 | + | netstandard1.3 | N | N | N | N | N | N | N | N | N | N | |
| 58 | + | net472, net48 | N | N | Y | N | N | N | Y | N | N | N | |
| 59 | + +===================+=======+==========+=====================+=============+=================+====================+==============+=========|============|===============| |
| 60 | + --> |
| 61 | + <Choose> |
| 62 | + <When Condition="'$(TargetFramework)' == 'net472' OR '$(TargetFramework)' == 'net48'"> |
| 63 | + <PropertyGroup> |
| 64 | + <DefineConstants>$(DefineConstants);SUPPORTS_EXTENDED_INTRINSICS</DefineConstants> |
| 65 | + <DefineConstants>$(DefineConstants);SUPPORTS_CODECOVERAGE</DefineConstants> |
| 66 | + </PropertyGroup> |
| 67 | + </When> |
| 68 | + <When Condition="'$(TargetFramework)' == 'netstandard2.0'"> |
| 69 | + <PropertyGroup> |
| 70 | + <DefineConstants>$(DefineConstants);SUPPORTS_EXTENDED_INTRINSICS</DefineConstants> |
| 71 | + <DefineConstants>$(DefineConstants);SUPPORTS_CODECOVERAGE</DefineConstants> |
| 72 | + </PropertyGroup> |
| 73 | + </When> |
| 74 | + <When Condition="'$(TargetFramework)' == 'netstandard2.1'"> |
| 75 | + <PropertyGroup> |
| 76 | + <DefineConstants>$(DefineConstants);SUPPORTS_MATHF</DefineConstants> |
| 77 | + <DefineConstants>$(DefineConstants);SUPPORTS_HASHCODE</DefineConstants> |
| 78 | + <DefineConstants>$(DefineConstants);SUPPORTS_SPAN_STREAM</DefineConstants> |
| 79 | + <DefineConstants>$(DefineConstants);SUPPORTS_ENCODING_STRING</DefineConstants> |
| 80 | + <DefineConstants>$(DefineConstants);SUPPORTS_CODECOVERAGE</DefineConstants> |
| 81 | + <DefineConstants>$(DefineConstants);SUPPORTS_CREATESPAN</DefineConstants> |
| 82 | + </PropertyGroup> |
| 83 | + </When> |
| 84 | + <When Condition="'$(TargetFramework)' == 'netcoreapp2.0'"> |
| 85 | + <PropertyGroup> |
| 86 | + <DefineConstants>$(DefineConstants);SUPPORTS_MATHF</DefineConstants> |
| 87 | + <DefineConstants>$(DefineConstants);SUPPORTS_CODECOVERAGE</DefineConstants> |
| 88 | + <DefineConstants>$(DefineConstants);SUPPORTS_CREATESPAN</DefineConstants> |
| 89 | + </PropertyGroup> |
| 90 | + </When> |
| 91 | + <When Condition="'$(TargetFramework)' == 'netcoreapp2.1'"> |
| 92 | + <PropertyGroup> |
| 93 | + <DefineConstants>$(DefineConstants);SUPPORTS_MATHF</DefineConstants> |
| 94 | + <DefineConstants>$(DefineConstants);SUPPORTS_HASHCODE</DefineConstants> |
| 95 | + <DefineConstants>$(DefineConstants);SUPPORTS_EXTENDED_INTRINSICS</DefineConstants> |
| 96 | + <DefineConstants>$(DefineConstants);SUPPORTS_SPAN_STREAM</DefineConstants> |
| 97 | + <DefineConstants>$(DefineConstants);SUPPORTS_ENCODING_STRING</DefineConstants> |
| 98 | + <DefineConstants>$(DefineConstants);SUPPORTS_CODECOVERAGE</DefineConstants> |
| 99 | + <DefineConstants>$(DefineConstants);SUPPORTS_CREATESPAN</DefineConstants> |
| 100 | + </PropertyGroup> |
| 101 | + </When> |
| 102 | + <When Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)','netcoreapp3.1'))"> |
| 103 | + <!--NETCORE 3.1. NET5.0, and future versions will fallback to this as the closest target.--> |
| 104 | + <PropertyGroup> |
| 105 | + <DefineConstants>$(DefineConstants);SUPPORTS_MATHF</DefineConstants> |
| 106 | + <DefineConstants>$(DefineConstants);SUPPORTS_HASHCODE</DefineConstants> |
| 107 | + <DefineConstants>$(DefineConstants);SUPPORTS_EXTENDED_INTRINSICS</DefineConstants> |
| 108 | + <DefineConstants>$(DefineConstants);SUPPORTS_SPAN_STREAM</DefineConstants> |
| 109 | + <DefineConstants>$(DefineConstants);SUPPORTS_ENCODING_STRING</DefineConstants> |
| 110 | + <DefineConstants>$(DefineConstants);SUPPORTS_RUNTIME_INTRINSICS</DefineConstants> |
| 111 | + <DefineConstants>$(DefineConstants);SUPPORTS_CODECOVERAGE</DefineConstants> |
| 112 | + <DefineConstants>$(DefineConstants);SUPPORTS_HOTPATH</DefineConstants> |
| 113 | + <DefineConstants>$(DefineConstants);SUPPORTS_CREATESPAN</DefineConstants> |
| 114 | + <DefineConstants>$(DefineConstants);SUPPORTS_BITOPERATIONS</DefineConstants> |
| 115 | + </PropertyGroup> |
| 116 | + </When> |
| 117 | + </Choose> |
56 | 118 |
|
57 | 119 | </Project>
|
0 commit comments