Skip to content

Commit

Permalink
Addd NetToolMinimum and format description (#14179)
Browse files Browse the repository at this point in the history
  • Loading branch information
ViktorHofer committed Oct 31, 2023
1 parent 0ebe09a commit adbabc1
Showing 1 changed file with 25 additions and 17 deletions.
42 changes: 25 additions & 17 deletions src/Microsoft.DotNet.Arcade.Sdk/tools/TargetFrameworkDefaults.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,44 @@
<Project>
<!-- Repositories using the arcade SDK can stay up to date with their target framework more easily using the properties in this file.
- NetCurrent The TFM of the major release of .NET that the Arcade SDK aligns with.
- NetPrevious The previously released version of .NET. NetPrevious property is undefined whenever NetMinimum and
NetPrevious would evaluate to the same TFM. This is necessary as NuGet doesn't support duplicated TFM
values in the TargetFrameworks string.
- NetMinimum Lowest supported version of .NET the time of the release of NetCurrent. E.g. if NetCurrent is net8.0,
then NetMinimum is net6.0.
- NetToolCurrent The version of .NET that tools (msbuild tasks) should target.
- NetFrameworkCurrent The TFM of the latest version of .NET Framework.
- NetFrameworkMinimum Lowest supported version of .NET Framework the time of the release of NetCurrent. E.g. if NetCurrent is
net8.0, then NetFrameworkMinimum is net462
- NetFrameworkToolCurrent The version of .NET Framework that tools (msbuild tasks) should target.
Examples:
<TargetFrameworks>$(NetCurrent)</TargetFrameworks>
<TargetFrameworks>$(NetCurrent);$(NetFrameworkCurrent)</TargetFrameworks>
<TargetFrameworks>$(NetCurrent);$(NetMinimum);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
-->

<PropertyGroup>
<!-- .NET -->
<!-- The TFM of the major release of .NET that the Arcade SDK aligns with. -->
<NetCurrent>net8.0</NetCurrent>

<!-- The previously released version of .NET.
Undefined when NetMinimum and NetPrevious are identical. -->
<NetPrevious>net7.0</NetPrevious>

<!-- Lowest supported version of .NET at the time of the release of NetCurrent.
E.g. net6.0 when NetCurrent is net8.0. -->
<NetMinimum>net6.0</NetMinimum>
<NetToolCurrent Condition="'$(DotNetBuildFromSource)' != 'true'">net8.0</NetToolCurrent>
<NetToolCurrent Condition="'$(DotNetBuildFromSource)' == 'true'">$(NetCurrent)</NetToolCurrent>

<!-- .NET Framework -->
<!-- The TFM of the latest version of .NET Framework. -->
<NetFrameworkCurrent>net481</NetFrameworkCurrent>

<!-- Lowest supported version of .NET Framework the time of the release of NetCurrent.
E.g. if NetCurrent is net8.0, then NetFrameworkMinimum is net462. -->
<NetFrameworkMinimum>net462</NetFrameworkMinimum>
</PropertyGroup>

<PropertyGroup>
<!-- The current version of .NET that tools (i.e. msbuild) target.
MSBuild tasks and tools should use this version to target the latest TFM that is supported by tooling.
Identical with NetCurrent when building from source. -->
<NetToolCurrent Condition="'$(DotNetBuildFromSource)' != 'true'">net8.0</NetToolCurrent>
<NetToolCurrent Condition="'$(DotNetBuildFromSource)' == 'true'">$(NetCurrent)</NetToolCurrent>

<!-- Lowest version of .NET at the time of the release of NetCurrent that is supported by tooling.
Undefined when NetToolCurrent and NetToolMinimum are identical. -->
<NetToolMinimum>net6.0</NetToolMinimum>

<!-- The version of .NET Framework that tools (i.e. msbuild tasks) should target. -->
<NetFrameworkToolCurrent>net472</NetFrameworkToolCurrent>
</PropertyGroup>

Expand Down

0 comments on commit adbabc1

Please sign in to comment.