From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Logan Bussell Date: Tue, 19 Jul 2022 14:47:28 -0700 Subject: [PATCH] Update projects to net7.0 TFM with shared property, Only enable trimming for .NET Core Backport PR: https://github.com/dotnet/command-line-api/pull/1803 --- Directory.Build.props | 1 + global.json | 7 ++++--- .../System.CommandLine.ApiCompatibility.Tests.csproj | 2 +- .../System.CommandLine.Benchmarks.csproj | 4 ++-- .../System.CommandLine.DragonFruit.Tests.csproj | 2 +- .../System.CommandLine.Generator.Tests.csproj | 2 +- .../System.CommandLine.Hosting.Tests.csproj | 2 +- .../System.CommandLine.NamingConventionBinder.Tests.csproj | 2 +- .../System.CommandLine.Rendering.Tests.csproj | 2 +- .../EndToEndTestApp/EndToEndTestApp.csproj | 2 +- .../dotnet-suggest.Tests.csproj | 2 +- src/System.CommandLine.Suggest/dotnet-suggest.csproj | 2 +- .../System.CommandLine.Tests.csproj | 2 +- .../TestApps/NativeAOT/NativeAOT.csproj | 4 ++-- .../TestApps/Trimming/Trimming.csproj | 4 ++-- src/System.CommandLine/System.CommandLine.csproj | 7 +++++-- 16 files changed, 26 insertions(+), 21 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index c0c5f79a..901c57c7 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -9,6 +9,7 @@ $(NoWarn);CS8714;CS8765;CS8600;CS8601;CS8602;CS8603;CS8604 MIT 10.0 + net7.0 diff --git a/global.json b/global.json index 1c6fd268..f5bec611 100644 --- a/global.json +++ b/global.json @@ -1,12 +1,13 @@ { "tools": { - "dotnet": "6.0.100", + "dotnet": "7.0.100-preview.6.22352.1", "runtimes": { "dotnet": [ - "5.0.10" + "5.0.17", + "6.0.7" ] }, - "xcopy-msbuild": "16.10.0-preview2" + "xcopy-msbuild": "17.1.0" }, "msbuild-sdks": { "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22168.2" diff --git a/src/System.CommandLine.ApiCompatibility.Tests/System.CommandLine.ApiCompatibility.Tests.csproj b/src/System.CommandLine.ApiCompatibility.Tests/System.CommandLine.ApiCompatibility.Tests.csproj index 30bcd139..4cc48fde 100644 --- a/src/System.CommandLine.ApiCompatibility.Tests/System.CommandLine.ApiCompatibility.Tests.csproj +++ b/src/System.CommandLine.ApiCompatibility.Tests/System.CommandLine.ApiCompatibility.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + $(TargetFrameworkForNETSDK) false diff --git a/src/System.CommandLine.Benchmarks/System.CommandLine.Benchmarks.csproj b/src/System.CommandLine.Benchmarks/System.CommandLine.Benchmarks.csproj index e54aabc4..185ba62a 100644 --- a/src/System.CommandLine.Benchmarks/System.CommandLine.Benchmarks.csproj +++ b/src/System.CommandLine.Benchmarks/System.CommandLine.Benchmarks.csproj @@ -9,8 +9,8 @@ false - net461;net5.0;net6.0; - net5.0;net6.0; + net461;net5.0;net6.0;net7.0 + net5.0;net6.0;net7.0 False diff --git a/src/System.CommandLine.DragonFruit.Tests/System.CommandLine.DragonFruit.Tests.csproj b/src/System.CommandLine.DragonFruit.Tests/System.CommandLine.DragonFruit.Tests.csproj index 7eee0b38..e504f7e8 100644 --- a/src/System.CommandLine.DragonFruit.Tests/System.CommandLine.DragonFruit.Tests.csproj +++ b/src/System.CommandLine.DragonFruit.Tests/System.CommandLine.DragonFruit.Tests.csproj @@ -1,6 +1,6 @@  - net6.0 + $(TargetFrameworkForNETSDK) AutoGeneratedProgram true diff --git a/src/System.CommandLine.Generator.Tests/System.CommandLine.Generator.Tests.csproj b/src/System.CommandLine.Generator.Tests/System.CommandLine.Generator.Tests.csproj index a423eb1e..20f0f410 100644 --- a/src/System.CommandLine.Generator.Tests/System.CommandLine.Generator.Tests.csproj +++ b/src/System.CommandLine.Generator.Tests/System.CommandLine.Generator.Tests.csproj @@ -1,6 +1,6 @@  - net6.0 + $(TargetFrameworkForNETSDK) $(TargetFrameworks);net462 true true diff --git a/src/System.CommandLine.Hosting.Tests/System.CommandLine.Hosting.Tests.csproj b/src/System.CommandLine.Hosting.Tests/System.CommandLine.Hosting.Tests.csproj index 328b4e12..8e2cd6ea 100644 --- a/src/System.CommandLine.Hosting.Tests/System.CommandLine.Hosting.Tests.csproj +++ b/src/System.CommandLine.Hosting.Tests/System.CommandLine.Hosting.Tests.csproj @@ -1,7 +1,7 @@  - net6.0 + $(TargetFrameworkForNETSDK) $(TargetFrameworks);net462 false diff --git a/src/System.CommandLine.NamingConventionBinder.Tests/System.CommandLine.NamingConventionBinder.Tests.csproj b/src/System.CommandLine.NamingConventionBinder.Tests/System.CommandLine.NamingConventionBinder.Tests.csproj index 43eb7c29..7bff1796 100644 --- a/src/System.CommandLine.NamingConventionBinder.Tests/System.CommandLine.NamingConventionBinder.Tests.csproj +++ b/src/System.CommandLine.NamingConventionBinder.Tests/System.CommandLine.NamingConventionBinder.Tests.csproj @@ -1,6 +1,6 @@  - net6.0 + $(TargetFrameworkForNETSDK) $(TargetFrameworks);net462 10 diff --git a/src/System.CommandLine.Rendering.Tests/System.CommandLine.Rendering.Tests.csproj b/src/System.CommandLine.Rendering.Tests/System.CommandLine.Rendering.Tests.csproj index 1c116508..afd6dc6a 100644 --- a/src/System.CommandLine.Rendering.Tests/System.CommandLine.Rendering.Tests.csproj +++ b/src/System.CommandLine.Rendering.Tests/System.CommandLine.Rendering.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + $(TargetFrameworkForNETSDK) false diff --git a/src/System.CommandLine.Suggest.Tests/EndToEndTestApp/EndToEndTestApp.csproj b/src/System.CommandLine.Suggest.Tests/EndToEndTestApp/EndToEndTestApp.csproj index 9a3eb54d..76add0d5 100644 --- a/src/System.CommandLine.Suggest.Tests/EndToEndTestApp/EndToEndTestApp.csproj +++ b/src/System.CommandLine.Suggest.Tests/EndToEndTestApp/EndToEndTestApp.csproj @@ -6,7 +6,7 @@ Exe - net6.0 + $(TargetFrameworkForNETSDK) diff --git a/src/System.CommandLine.Suggest.Tests/dotnet-suggest.Tests.csproj b/src/System.CommandLine.Suggest.Tests/dotnet-suggest.Tests.csproj index da6abedf..f1711a10 100644 --- a/src/System.CommandLine.Suggest.Tests/dotnet-suggest.Tests.csproj +++ b/src/System.CommandLine.Suggest.Tests/dotnet-suggest.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + $(TargetFrameworkForNETSDK) diff --git a/src/System.CommandLine.Suggest/dotnet-suggest.csproj b/src/System.CommandLine.Suggest/dotnet-suggest.csproj index fd825008..ce4bda1d 100644 --- a/src/System.CommandLine.Suggest/dotnet-suggest.csproj +++ b/src/System.CommandLine.Suggest/dotnet-suggest.csproj @@ -1,7 +1,7 @@  Exe - net6.0 + $(TargetFrameworkForNETSDK) true true dotnet-suggest diff --git a/src/System.CommandLine.Tests/System.CommandLine.Tests.csproj b/src/System.CommandLine.Tests/System.CommandLine.Tests.csproj index c1988ec4..44b5c9fc 100644 --- a/src/System.CommandLine.Tests/System.CommandLine.Tests.csproj +++ b/src/System.CommandLine.Tests/System.CommandLine.Tests.csproj @@ -1,6 +1,6 @@  - net6.0 + $(TargetFrameworkForNETSDK) $(TargetFrameworks);net462 false diff --git a/src/System.CommandLine.Tests/TestApps/NativeAOT/NativeAOT.csproj b/src/System.CommandLine.Tests/TestApps/NativeAOT/NativeAOT.csproj index b0036ed0..cc306fea 100644 --- a/src/System.CommandLine.Tests/TestApps/NativeAOT/NativeAOT.csproj +++ b/src/System.CommandLine.Tests/TestApps/NativeAOT/NativeAOT.csproj @@ -2,13 +2,13 @@ Exe - net6.0 + $(TargetFrameworkForNETSDK) false - ..\..\..\System.CommandLine\bin\Release\net6.0\System.CommandLine.dll + ..\..\..\System.CommandLine\bin\Release\$(TargetFrameworkForNETSDK)\System.CommandLine.dll diff --git a/src/System.CommandLine.Tests/TestApps/Trimming/Trimming.csproj b/src/System.CommandLine.Tests/TestApps/Trimming/Trimming.csproj index 6dcf8892..615b0764 100644 --- a/src/System.CommandLine.Tests/TestApps/Trimming/Trimming.csproj +++ b/src/System.CommandLine.Tests/TestApps/Trimming/Trimming.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + $(TargetFrameworkForNETSDK) enable enable true @@ -10,7 +10,7 @@ - ..\..\..\System.CommandLine\bin\Release\net6.0\System.CommandLine.dll + ..\..\..\System.CommandLine\bin\Release\$(TargetFrameworkForNETSDK)\System.CommandLine.dll diff --git a/src/System.CommandLine/System.CommandLine.csproj b/src/System.CommandLine/System.CommandLine.csproj index 424053a6..37115d70 100644 --- a/src/System.CommandLine/System.CommandLine.csproj +++ b/src/System.CommandLine/System.CommandLine.csproj @@ -3,7 +3,7 @@ true System.CommandLine - net6.0;netstandard2.0 + $(TargetFrameworkForNETSDK);netstandard2.0 enable true 10 @@ -15,9 +15,12 @@ * Test and debug support true + true + + + true true - true