From c236f4189e027d7dab43b80475afb28f4a72305f Mon Sep 17 00:00:00 2001 From: AraHaan Date: Fri, 18 Mar 2022 16:46:32 -0400 Subject: [PATCH 1/3] Update tests and code to add .NET 7 targets. --- .../System.CommandLine.ApiCompatibility.Tests.csproj | 7 ++++++- .../System.CommandLine.Benchmarks.csproj | 4 ++-- .../System.CommandLine.DragonFruit.Tests.csproj | 2 +- .../System.CommandLine.DragonFruit.csproj | 2 +- .../System.CommandLine.Generator.Tests.csproj | 2 +- .../System.CommandLine.Hosting.Tests.csproj | 2 +- .../System.CommandLine.Hosting.csproj | 2 +- .../System.CommandLine.NamingConventionBinder.Tests.csproj | 2 +- .../System.CommandLine.NamingConventionBinder.csproj | 2 +- .../System.CommandLine.Rendering.Tests.csproj | 2 +- .../System.CommandLine.Rendering.csproj | 5 +++-- .../System.CommandLine.Tests.csproj | 2 +- src/System.CommandLine/System.CommandLine.csproj | 2 +- 13 files changed, 21 insertions(+), 15 deletions(-) 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 30bcd13942..469c8698bf 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 + net7.0 false @@ -21,6 +21,11 @@ all runtime; build; native; contentfiles; analyzers + + + all + runtime; build; native; contentfiles; analyzers + diff --git a/src/System.CommandLine.Benchmarks/System.CommandLine.Benchmarks.csproj b/src/System.CommandLine.Benchmarks/System.CommandLine.Benchmarks.csproj index e54aabc422..185ba62a78 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 7eee0b3856..81e3895370 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 + net7.0 AutoGeneratedProgram true diff --git a/src/System.CommandLine.DragonFruit/System.CommandLine.DragonFruit.csproj b/src/System.CommandLine.DragonFruit/System.CommandLine.DragonFruit.csproj index e566bfd10d..d024ddcc01 100644 --- a/src/System.CommandLine.DragonFruit/System.CommandLine.DragonFruit.csproj +++ b/src/System.CommandLine.DragonFruit/System.CommandLine.DragonFruit.csproj @@ -1,7 +1,7 @@  true - netstandard2.0 + netstandard2.0;net6.0;net7.0 This package includes the experimental DragonFruit app model for System.CommandLine, which allows you to create a command line application using only a Main method while getting support for complex type binding, error reporting, help, shell completions, and more. 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 a423eb1e7a..402ca8d79a 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 + net7.0 $(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 328b4e1245..9e9e3c23f3 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 + net7.0 $(TargetFrameworks);net462 false diff --git a/src/System.CommandLine.Hosting/System.CommandLine.Hosting.csproj b/src/System.CommandLine.Hosting/System.CommandLine.Hosting.csproj index 9433f93a0c..5955dfa4df 100644 --- a/src/System.CommandLine.Hosting/System.CommandLine.Hosting.csproj +++ b/src/System.CommandLine.Hosting/System.CommandLine.Hosting.csproj @@ -2,7 +2,7 @@ true - netstandard2.0;netstandard2.1 + netstandard2.0;netstandard2.1;net6.0;net7.0 This package provides support for using System.CommandLine with Microsoft.Extensions.Hosting. 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 b86154e044..b1126de1c2 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 + net7.0 $(TargetFrameworks);net462 10 diff --git a/src/System.CommandLine.NamingConventionBinder/System.CommandLine.NamingConventionBinder.csproj b/src/System.CommandLine.NamingConventionBinder/System.CommandLine.NamingConventionBinder.csproj index 567e87f251..ea9b0372b8 100644 --- a/src/System.CommandLine.NamingConventionBinder/System.CommandLine.NamingConventionBinder.csproj +++ b/src/System.CommandLine.NamingConventionBinder/System.CommandLine.NamingConventionBinder.csproj @@ -3,7 +3,7 @@ true System.CommandLine.NamingConventionBinder - netstandard2.0 + netstandard2.0;net6.0;net7.0 10 enable This package provides command handler support for System.CommandLine performs parameter and model binding by matching option and argument names to parameter and property names. 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 1c116508e3..b07314646e 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 + net7.0 false diff --git a/src/System.CommandLine.Rendering/System.CommandLine.Rendering.csproj b/src/System.CommandLine.Rendering/System.CommandLine.Rendering.csproj index 91e863eae4..d0e925ed76 100644 --- a/src/System.CommandLine.Rendering/System.CommandLine.Rendering.csproj +++ b/src/System.CommandLine.Rendering/System.CommandLine.Rendering.csproj @@ -2,14 +2,15 @@ true - netstandard2.0 + netstandard2.0;net6.0;net7.0 This package provides support for structured command line output rendering. Write code once that renders correctly in multiple output modes, including System.Console, virtual terminal (using ANSI escape sequences), and plain text. - + + diff --git a/src/System.CommandLine.Tests/System.CommandLine.Tests.csproj b/src/System.CommandLine.Tests/System.CommandLine.Tests.csproj index 486e4e1d54..179214322a 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 + net7.0 $(TargetFrameworks);net462 false diff --git a/src/System.CommandLine/System.CommandLine.csproj b/src/System.CommandLine/System.CommandLine.csproj index 424053a6e8..613b8f6d75 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 + net6.0;net7.0;netstandard2.0 enable true 10 From 314e323d43ee289dc8acf1d9cfe90fca4472f820 Mon Sep 17 00:00:00 2001 From: AraHaan Date: Fri, 18 Mar 2022 17:01:45 -0400 Subject: [PATCH 2/3] Update global.json. --- global.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/global.json b/global.json index ebf97b3178..672900c81c 100644 --- a/global.json +++ b/global.json @@ -1,9 +1,11 @@ { "tools": { - "dotnet": "6.0.100", + "dotnet": "7.0.100-preview.2.22153.17", "runtimes": { "dotnet": [ - "5.0.10" + "5.0.10", + "6.0.3", + "7.0.0" ] }, "xcopy-msbuild": "16.10.0-preview2" From 75b866bc5c8d4cd99a418e55883beb2f02d4cba1 Mon Sep 17 00:00:00 2001 From: AraHaan Date: Fri, 18 Mar 2022 18:09:44 -0400 Subject: [PATCH 3/3] Apply suggestions from code review --- global.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/global.json b/global.json index 672900c81c..b34d049a5e 100644 --- a/global.json +++ b/global.json @@ -4,8 +4,7 @@ "runtimes": { "dotnet": [ "5.0.10", - "6.0.3", - "7.0.0" + "6.0.3" ] }, "xcopy-msbuild": "16.10.0-preview2"