Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addd NetToolMinimum and format description #14179

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading