From 7dce4af5520693e2960f88d3bab5d3f9ad7d6ebd Mon Sep 17 00:00:00 2001 From: Patrik Svensson Date: Wed, 9 Nov 2022 06:58:39 +0100 Subject: [PATCH] Add support for .NET 7.0 --- README.fa.md | 2 +- README.jp.md | 2 +- README.md | 2 +- README.pt-BR.md | 2 +- README.zh.md | 2 +- build.cake | 10 +++---- docs/Docs.csproj | 2 +- docs/README.md | 2 +- docs/global.json | 2 +- docs/input/_layout.cshtml | 2 +- docs/input/index.md | 4 +-- docs/src/SocialCards/index.cshtml | 2 +- dotnet-tools.json | 2 +- examples/Cli/Delegates/Delegates.csproj | 2 +- examples/Cli/Demo/Demo.csproj | 2 +- examples/Cli/Dynamic/Dynamic.csproj | 2 +- examples/Cli/Injection/Injection.csproj | 2 +- examples/Cli/Logging/Logging.csproj | 2 +- .../AlternateScreen/AlternateScreen.csproj | 2 +- examples/Console/Borders/Borders.csproj | 2 +- examples/Console/Calendars/Calendars.csproj | 2 +- examples/Console/Canvas/Canvas.csproj | 2 +- examples/Console/Charts/Charts.csproj | 2 +- examples/Console/Colors/Colors.csproj | 2 +- examples/Console/Columns/Columns.csproj | 2 +- examples/Console/Cursor/Cursor.csproj | 2 +- examples/Console/Emojis/Emojis.csproj | 2 +- examples/Console/Exceptions/Exceptions.csproj | 2 +- examples/Console/Figlet/Figlet.csproj | 2 +- examples/Console/Grids/Grids.csproj | 2 +- examples/Console/Info/Info.csproj | 2 +- examples/Console/Links/Links.csproj | 2 +- examples/Console/Live/Live.csproj | 2 +- examples/Console/LiveTable/LiveTable.csproj | 2 +- examples/Console/Minimal/Minimal.csproj | 2 +- examples/Console/Panels/Panels.csproj | 2 +- examples/Console/Paths/Paths.csproj | 2 +- examples/Console/Progress/Progress.csproj | 2 +- examples/Console/Prompt/Prompt.csproj | 2 +- examples/Console/Rules/Rules.csproj | 2 +- examples/Console/Showcase/Showcase.csproj | 2 +- examples/Console/Status/Status.csproj | 2 +- examples/Console/Tables/Tables.csproj | 2 +- examples/Console/Trees/Trees.csproj | 2 +- examples/Shared/Shared.csproj | 2 +- global.json | 2 +- resources/scripts/Generator/Generator.csproj | 2 +- src/Directory.Build.props | 4 +-- .../Spectre.Console.Analyzer.Sandbox.csproj | 2 +- .../Spectre.Console.Cli.csproj | 4 +-- .../Spectre.Console.ImageSharp.csproj | 2 +- .../Spectre.Console.Testing.csproj | 2 +- .../Extensions/EnumerableExtensions.cs | 2 +- .../Extensions/StringBuilderExtensions.cs | 2 +- .../Internal/Colors/ColorSystemDetector.cs | 4 +-- src/Spectre.Console/Spectre.Console.csproj | 4 +-- test/Directory.Build.props | 2 +- .../Spectre.Console.Cli.Tests.csproj | 29 +++++++++---------- .../Utilities/ModuleInitializerAttribute.cs | 2 +- .../VerifyConfiguration.cs | 2 +- .../Spectre.Console.Tests.csproj | 11 ++++--- test/Spectre.Console.Tests/Unit/StyleTests.cs | 4 +-- .../Utilities/ModuleInitializerAttribute.cs | 2 +- .../VerifyConfiguration.cs | 2 +- 64 files changed, 91 insertions(+), 93 deletions(-) diff --git a/README.fa.md b/README.fa.md index 5b3a446..9eec6ed 100644 --- a/README.fa.md +++ b/README.fa.md @@ -4,7 +4,7 @@ _[![Spectre.Console NuGet Version](https://img.shields.io/nuget/v/spectre.consol
-یک کتابخانه NET Standard 2.0/.NET 6. که ایجاد Console Applicationهای زیبا و cross platform را آسان‌تر می‌کند. +یک کتابخانه .NET. که ایجاد Console Applicationهای زیبا و cross platform را آسان‌تر می‌کند. از کتابخانه عالی [Rich](https://github.com/willmcgugan/rich) برای پایتون، بسیار الهام گرفته شده است. ## فهرست diff --git a/README.jp.md b/README.jp.md index 2354682..6f3c55f 100644 --- a/README.jp.md +++ b/README.jp.md @@ -2,7 +2,7 @@ _[![Spectre.Console NuGet Version](https://img.shields.io/nuget/v/spectre.console.svg?style=flat&label=NuGet%3A%20Spectre.Console)](https://www.nuget.org/packages/spectre.console)_ -綺麗なコンソールアプリケーションを簡単に作成するための.NET Standard 2.0ライブラリです。 +綺麗なコンソールアプリケーションを簡単に作成するための.NETライブラリです。 Python用の素晴らしい[Rich ライブラリ](https://github.com/willmcgugan/rich)に強く影響を受けています。 ## 目次 diff --git a/README.md b/README.md index ed8a9a0..4c78710 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ _[![Spectre.Console NuGet Version](https://img.shields.io/nuget/v/spectre.console.svg?style=flat&label=NuGet%3A%20Spectre.Console)](https://www.nuget.org/packages/spectre.console)_ _[![Spectre.Console CLI NuGet Version](https://img.shields.io/nuget/v/spectre.console.cli.svg?style=flat&label=NuGet%3A%20Spectre.Console.Cli)](https://www.nuget.org/packages/spectre.console.cli)_ [![Netlify Status](https://api.netlify.com/api/v1/badges/1eaf215a-eb9c-45e4-8c64-c90b62963149/deploy-status)](https://app.netlify.com/sites/spectreconsole/deploys) -A .NET 6/.NET Standard 2.0 library that makes it easier to create beautiful, cross platform, console applications. +A .NET library that makes it easier to create beautiful, cross platform, console applications. It is heavily inspired by the excellent [Rich library](https://github.com/willmcgugan/rich) for Python. For detailed usage instructions, [please refer to the documentation at https://spectreconsole.net/.](https://spectreconsole.net/) diff --git a/README.pt-BR.md b/README.pt-BR.md index 8012999..f88a3e7 100644 --- a/README.pt-BR.md +++ b/README.pt-BR.md @@ -2,7 +2,7 @@ _[![Spectre.Console NuGet Versão](https://img.shields.io/nuget/v/spectre.console.svg?style=flat&label=NuGet%3A%20Spectre.Console)](https://www.nuget.org/packages/spectre.console)_ -Uma biblioteca .NET 6/.NET Standard 2.0 que torna mais fácil criar aplicativos de console bonitos e multiplataforma. +Uma biblioteca .NET que torna mais fácil criar aplicativos de console bonitos e multiplataforma. É fortemente inspirada na excelente [biblioteca Rich](https://github.com/willmcgugan/rich) para Python. diff --git a/README.zh.md b/README.zh.md index fe7598d..981bb5b 100644 --- a/README.zh.md +++ b/README.zh.md @@ -2,7 +2,7 @@ _[![Spectre.Console NuGet Version](https://img.shields.io/nuget/v/spectre.console.svg?style=flat&label=NuGet%3A%20Spectre.Console)](https://www.nuget.org/packages/spectre.console)_ -`Spectre.Console`是一个 .NET 6/.NET Standard 2.0 的库,可以更轻松地创建美观的跨平台控制台应用程序。 +`Spectre.Console`是一个 .NET 的库,可以更轻松地创建美观的跨平台控制台应用程序。 深受 [Rich](https://github.com/willmcgugan/rich) 这个Python优秀库的启发。 diff --git a/build.cake b/build.cake index a75d9d5..d61b978 100644 --- a/build.cake +++ b/build.cake @@ -17,7 +17,7 @@ Task("Build") DotNetBuild("./src/Spectre.Console.sln", new DotNetBuildSettings { Configuration = configuration, NoIncremental = context.HasArgument("rebuild"), - MSBuildSettings = new DotNetCoreMSBuildSettings() + MSBuildSettings = new DotNetMSBuildSettings() .TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error) }); }); @@ -29,7 +29,7 @@ Task("Build-Analyzer") DotNetBuild("./src/Spectre.Console.Analyzer.sln", new DotNetBuildSettings { Configuration = configuration, NoIncremental = context.HasArgument("rebuild"), - MSBuildSettings = new DotNetCoreMSBuildSettings() + MSBuildSettings = new DotNetMSBuildSettings() .TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error) }); }); @@ -41,7 +41,7 @@ Task("Build-Examples") DotNetBuild("./examples/Examples.sln", new DotNetBuildSettings { Configuration = configuration, NoIncremental = context.HasArgument("rebuild"), - MSBuildSettings = new DotNetCoreMSBuildSettings() + MSBuildSettings = new DotNetMSBuildSettings() .TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error) }); }); @@ -80,7 +80,7 @@ Task("Package") NoRestore = true, NoBuild = true, OutputDirectory = "./.artifacts", - MSBuildSettings = new DotNetCoreMSBuildSettings() + MSBuildSettings = new DotNetMSBuildSettings() .TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error) }); @@ -89,7 +89,7 @@ Task("Package") NoRestore = true, NoBuild = true, OutputDirectory = "./.artifacts", - MSBuildSettings = new DotNetCoreMSBuildSettings() + MSBuildSettings = new DotNetMSBuildSettings() .TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error) }); }); diff --git a/docs/Docs.csproj b/docs/Docs.csproj index 14d9b7f..5ae29ed 100644 --- a/docs/Docs.csproj +++ b/docs/Docs.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 $(MSBuildProjectDirectory) $(DefaultItemExcludes);output\**;.gitignore MVC1000 diff --git a/docs/README.md b/docs/README.md index 531931d..29a681d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,6 @@ # Documentation -To start contributing to the [Spectre.Console](https://github.com/spectreconsole/spectre.console) documentation, you will need the [.NET Core SDK](https://dot.net) 5.0.202 or higher (as defined in the repository root `global.json` file). +To start contributing to the [Spectre.Console](https://github.com/spectreconsole/spectre.console) documentation, you will need the [.NET Core SDK](https://dot.net) 7.0.100 or higher (as defined in the repository root `global.json` file). ## Running Preview Site diff --git a/docs/global.json b/docs/global.json index 49d2255..77c776f 100644 --- a/docs/global.json +++ b/docs/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "6.0.300", + "version": "7.0.100", "rollForward": "latestFeature" } } diff --git a/docs/input/_layout.cshtml b/docs/input/_layout.cshtml index a8143e9..b0a94d7 100644 --- a/docs/input/_layout.cshtml +++ b/docs/input/_layout.cshtml @@ -17,7 +17,7 @@ @{ string title = Document.ContainsKey(Keys.Title) ? $"Spectre.Console - {Document.GetString(Keys.Title)}" : "Spectre.Console"; - string description = Document.ContainsKey(Constants.Description) ? Document.GetString(Constants.Description) : "Spectre.Console is a .NET Standard 2.0 library that makes it easier to create beautiful console applications"; + string description = Document.ContainsKey(Constants.Description) ? Document.GetString(Constants.Description) : "Spectre.Console is a .NET library that makes it easier to create beautiful console applications"; var card = Context.FindCard(Model.Id); var urlBase = $"https://{Document.GetString(Keys.Host)}/"; } diff --git a/docs/input/index.md b/docs/input/index.md index a9f16e3..8490224 100644 --- a/docs/input/index.md +++ b/docs/input/index.md @@ -1,9 +1,9 @@ Title: Welcome! -Description: Spectre.Console is a .NET Standard 2.0 library that makes it easier to create beautiful console applications. +Description: Spectre.Console is a .NET library that makes it easier to create beautiful console applications. Order: 0 --- -Spectre.Console is a `.NET Standard 2.0` library that makes it easier +Spectre.Console is a `.NET` library that makes it easier to create beautiful console applications. ## Spectre.Console.AnsiConsole Features diff --git a/docs/src/SocialCards/index.cshtml b/docs/src/SocialCards/index.cshtml index dc0a9b3..749052f 100644 --- a/docs/src/SocialCards/index.cshtml +++ b/docs/src/SocialCards/index.cshtml @@ -15,7 +15,7 @@
-
╭─ ~/spectre.console .NET 6.0  main
+
╭─ ~/spectre.console .NET 7.0  main
╰─ dotnet run
╭────────────────────────────────────────────────────────╮
diff --git a/dotnet-tools.json b/dotnet-tools.json index c02d1a3..a0b331c 100644 --- a/dotnet-tools.json +++ b/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "cake.tool": { - "version": "2.3.0", + "version": "3.0.0", "commands": [ "dotnet-cake" ] diff --git a/examples/Cli/Delegates/Delegates.csproj b/examples/Cli/Delegates/Delegates.csproj index e08f84a..53b2a23 100644 --- a/examples/Cli/Delegates/Delegates.csproj +++ b/examples/Cli/Delegates/Delegates.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 false Delegates Demonstrates how to specify commands as delegates. diff --git a/examples/Cli/Demo/Demo.csproj b/examples/Cli/Demo/Demo.csproj index 6b6904a..1044149 100644 --- a/examples/Cli/Demo/Demo.csproj +++ b/examples/Cli/Demo/Demo.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 false Demo Demonstrates the most common use cases of Spectre.Cli. diff --git a/examples/Cli/Dynamic/Dynamic.csproj b/examples/Cli/Dynamic/Dynamic.csproj index 86c9639..a5353a5 100644 --- a/examples/Cli/Dynamic/Dynamic.csproj +++ b/examples/Cli/Dynamic/Dynamic.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 false Dynamic Demonstrates how to define dynamic commands. diff --git a/examples/Cli/Injection/Injection.csproj b/examples/Cli/Injection/Injection.csproj index 9d9db39..6bebd69 100644 --- a/examples/Cli/Injection/Injection.csproj +++ b/examples/Cli/Injection/Injection.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 false Injection Demonstrates how to use dependency injection with Spectre.Cli. diff --git a/examples/Cli/Logging/Logging.csproj b/examples/Cli/Logging/Logging.csproj index e7c4cd0..5579c3c 100644 --- a/examples/Cli/Logging/Logging.csproj +++ b/examples/Cli/Logging/Logging.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 false Logging Demonstrates how to dynamically configure Serilog for logging using parameters from a command. diff --git a/examples/Console/AlternateScreen/AlternateScreen.csproj b/examples/Console/AlternateScreen/AlternateScreen.csproj index 24be5e7..8e18a00 100644 --- a/examples/Console/AlternateScreen/AlternateScreen.csproj +++ b/examples/Console/AlternateScreen/AlternateScreen.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 Screens Demonstrates how to use alternate screens. Widgets diff --git a/examples/Console/Borders/Borders.csproj b/examples/Console/Borders/Borders.csproj index 128b1b6..3f01d3e 100644 --- a/examples/Console/Borders/Borders.csproj +++ b/examples/Console/Borders/Borders.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 Borders Demonstrates the different kind of borders. Widgets diff --git a/examples/Console/Calendars/Calendars.csproj b/examples/Console/Calendars/Calendars.csproj index bcf9764..21606c3 100644 --- a/examples/Console/Calendars/Calendars.csproj +++ b/examples/Console/Calendars/Calendars.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 Calendars Demonstrates how to render calendars. Widgets diff --git a/examples/Console/Canvas/Canvas.csproj b/examples/Console/Canvas/Canvas.csproj index 63dfeeb..a1a1e95 100644 --- a/examples/Console/Canvas/Canvas.csproj +++ b/examples/Console/Canvas/Canvas.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 Canvas Demonstrates how to render pixels and images. Widgets diff --git a/examples/Console/Charts/Charts.csproj b/examples/Console/Charts/Charts.csproj index 3fe640f..1d78fa6 100644 --- a/examples/Console/Charts/Charts.csproj +++ b/examples/Console/Charts/Charts.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 Charts Demonstrates how to render charts in a console. Widgets diff --git a/examples/Console/Colors/Colors.csproj b/examples/Console/Colors/Colors.csproj index 642d5d0..5ed9565 100644 --- a/examples/Console/Colors/Colors.csproj +++ b/examples/Console/Colors/Colors.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 Colors Demonstrates how to use [yellow]c[/][red]o[/][green]l[/][blue]o[/][aqua]r[/][lime]s[/] in the console. Misc diff --git a/examples/Console/Columns/Columns.csproj b/examples/Console/Columns/Columns.csproj index b004dde..aab2635 100644 --- a/examples/Console/Columns/Columns.csproj +++ b/examples/Console/Columns/Columns.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 Columns Demonstrates how to render data into columns. Widgets diff --git a/examples/Console/Cursor/Cursor.csproj b/examples/Console/Cursor/Cursor.csproj index e2153cd..2a0a861 100644 --- a/examples/Console/Cursor/Cursor.csproj +++ b/examples/Console/Cursor/Cursor.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 Cursor Demonstrates how to move the cursor. Misc diff --git a/examples/Console/Emojis/Emojis.csproj b/examples/Console/Emojis/Emojis.csproj index e30aea9..71c43b7 100644 --- a/examples/Console/Emojis/Emojis.csproj +++ b/examples/Console/Emojis/Emojis.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 Emojis Demonstrates how to render emojis. Misc diff --git a/examples/Console/Exceptions/Exceptions.csproj b/examples/Console/Exceptions/Exceptions.csproj index d90cfb2..3e67e5e 100644 --- a/examples/Console/Exceptions/Exceptions.csproj +++ b/examples/Console/Exceptions/Exceptions.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 Exceptions Demonstrates how to render formatted exceptions. Misc diff --git a/examples/Console/Figlet/Figlet.csproj b/examples/Console/Figlet/Figlet.csproj index a59f0d7..3db0e85 100644 --- a/examples/Console/Figlet/Figlet.csproj +++ b/examples/Console/Figlet/Figlet.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 Figlet Demonstrates how to render FIGlet text. Widgets diff --git a/examples/Console/Grids/Grids.csproj b/examples/Console/Grids/Grids.csproj index 4d76183..c6991f3 100644 --- a/examples/Console/Grids/Grids.csproj +++ b/examples/Console/Grids/Grids.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 Grids Demonstrates how to render grids in a console. Widgets diff --git a/examples/Console/Info/Info.csproj b/examples/Console/Info/Info.csproj index ff94b84..ab7310f 100644 --- a/examples/Console/Info/Info.csproj +++ b/examples/Console/Info/Info.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 Info Displays the capabilities of the current console. Misc diff --git a/examples/Console/Links/Links.csproj b/examples/Console/Links/Links.csproj index 746a0f4..badb83c 100644 --- a/examples/Console/Links/Links.csproj +++ b/examples/Console/Links/Links.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 Links Demonstrates how to render links in a console. Misc diff --git a/examples/Console/Live/Live.csproj b/examples/Console/Live/Live.csproj index edfe36c..8aacf07 100644 --- a/examples/Console/Live/Live.csproj +++ b/examples/Console/Live/Live.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 Live Demonstrates how to do live updates. Live diff --git a/examples/Console/LiveTable/LiveTable.csproj b/examples/Console/LiveTable/LiveTable.csproj index fb9635f..47d5361 100644 --- a/examples/Console/LiveTable/LiveTable.csproj +++ b/examples/Console/LiveTable/LiveTable.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 LiveTable Demonstrates how to do live updates in a table. Live diff --git a/examples/Console/Minimal/Minimal.csproj b/examples/Console/Minimal/Minimal.csproj index 0ac0897..e680684 100644 --- a/examples/Console/Minimal/Minimal.csproj +++ b/examples/Console/Minimal/Minimal.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 enable Minimal Demonstrates a minimal console application. diff --git a/examples/Console/Panels/Panels.csproj b/examples/Console/Panels/Panels.csproj index 07f230d..9b7969b 100644 --- a/examples/Console/Panels/Panels.csproj +++ b/examples/Console/Panels/Panels.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 Panels Demonstrates how to render items in panels. Widgets diff --git a/examples/Console/Paths/Paths.csproj b/examples/Console/Paths/Paths.csproj index d6d9e16..e86a8cf 100644 --- a/examples/Console/Paths/Paths.csproj +++ b/examples/Console/Paths/Paths.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 Paths Demonstrates how to render paths. Widgets diff --git a/examples/Console/Progress/Progress.csproj b/examples/Console/Progress/Progress.csproj index 06a9a28..d34e3ec 100644 --- a/examples/Console/Progress/Progress.csproj +++ b/examples/Console/Progress/Progress.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 Progress Demonstrates how to show progress bars. Status diff --git a/examples/Console/Prompt/Prompt.csproj b/examples/Console/Prompt/Prompt.csproj index 76e9f57..760579c 100644 --- a/examples/Console/Prompt/Prompt.csproj +++ b/examples/Console/Prompt/Prompt.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 9 Prompt Demonstrates how to get input from a user. diff --git a/examples/Console/Rules/Rules.csproj b/examples/Console/Rules/Rules.csproj index f484036..7bcddd4 100644 --- a/examples/Console/Rules/Rules.csproj +++ b/examples/Console/Rules/Rules.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 Rules Demonstrates how to render horizontal rules (lines). Widgets diff --git a/examples/Console/Showcase/Showcase.csproj b/examples/Console/Showcase/Showcase.csproj index cdc667f..3944555 100644 --- a/examples/Console/Showcase/Showcase.csproj +++ b/examples/Console/Showcase/Showcase.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 Showcase Demonstation of Spectre.Console. Misc diff --git a/examples/Console/Status/Status.csproj b/examples/Console/Status/Status.csproj index 96a7472..886f934 100644 --- a/examples/Console/Status/Status.csproj +++ b/examples/Console/Status/Status.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 Status Demonstrates how to show status updates. Status diff --git a/examples/Console/Tables/Tables.csproj b/examples/Console/Tables/Tables.csproj index 7ea8eb2..bed52c6 100644 --- a/examples/Console/Tables/Tables.csproj +++ b/examples/Console/Tables/Tables.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 Tables Demonstrates how to render tables in a console. Widgets diff --git a/examples/Console/Trees/Trees.csproj b/examples/Console/Trees/Trees.csproj index d933118..0517fab 100644 --- a/examples/Console/Trees/Trees.csproj +++ b/examples/Console/Trees/Trees.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 Trees Demonstrates how to render trees in a console. Widgets diff --git a/examples/Shared/Shared.csproj b/examples/Shared/Shared.csproj index 358378d..b7c9678 100644 --- a/examples/Shared/Shared.csproj +++ b/examples/Shared/Shared.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 false enable diff --git a/global.json b/global.json index 0b738cd..70e3dcc 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "6.0.400" + "version": "7.0.100" } } diff --git a/resources/scripts/Generator/Generator.csproj b/resources/scripts/Generator/Generator.csproj index b63f006..7b92380 100644 --- a/resources/scripts/Generator/Generator.csproj +++ b/resources/scripts/Generator/Generator.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.1 + net7.0 default diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 64057c4..6bf853f 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -32,12 +32,12 @@ - + All - + All diff --git a/src/Spectre.Console.Analyzer.Sandbox/Spectre.Console.Analyzer.Sandbox.csproj b/src/Spectre.Console.Analyzer.Sandbox/Spectre.Console.Analyzer.Sandbox.csproj index 3f799ca..9ca4330 100644 --- a/src/Spectre.Console.Analyzer.Sandbox/Spectre.Console.Analyzer.Sandbox.csproj +++ b/src/Spectre.Console.Analyzer.Sandbox/Spectre.Console.Analyzer.Sandbox.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 diff --git a/src/Spectre.Console.Cli/Spectre.Console.Cli.csproj b/src/Spectre.Console.Cli/Spectre.Console.Cli.csproj index 42fe922..99623d2 100644 --- a/src/Spectre.Console.Cli/Spectre.Console.Cli.csproj +++ b/src/Spectre.Console.Cli/Spectre.Console.Cli.csproj @@ -1,7 +1,7 @@ - net6.0;netstandard2.0 + net7.0;net6.0;netstandard2.0 enable true SA1633 @@ -20,7 +20,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Spectre.Console.ImageSharp/Spectre.Console.ImageSharp.csproj b/src/Spectre.Console.ImageSharp/Spectre.Console.ImageSharp.csproj index 5564af2..8b57cac 100644 --- a/src/Spectre.Console.ImageSharp/Spectre.Console.ImageSharp.csproj +++ b/src/Spectre.Console.ImageSharp/Spectre.Console.ImageSharp.csproj @@ -1,7 +1,7 @@ - net6.0;netstandard2.0 + net7.0;net6.0;netstandard2.0 enable true A library that extends Spectre.Console with ImageSharp superpowers. diff --git a/src/Spectre.Console.Testing/Spectre.Console.Testing.csproj b/src/Spectre.Console.Testing/Spectre.Console.Testing.csproj index 851b890..c182429 100644 --- a/src/Spectre.Console.Testing/Spectre.Console.Testing.csproj +++ b/src/Spectre.Console.Testing/Spectre.Console.Testing.csproj @@ -1,7 +1,7 @@ - net6.0;netstandard2.0 + net7.0;net6.0;netstandard2.0 false enable true diff --git a/src/Spectre.Console/Extensions/EnumerableExtensions.cs b/src/Spectre.Console/Extensions/EnumerableExtensions.cs index ba43319..b41d4c7 100644 --- a/src/Spectre.Console/Extensions/EnumerableExtensions.cs +++ b/src/Spectre.Console/Extensions/EnumerableExtensions.cs @@ -110,7 +110,7 @@ internal static class EnumerableExtensions return source.Select((value, index) => func(value, index)); } -#if !NET5_0_OR_GREATER +#if !NET6_0_OR_GREATER public static IEnumerable<(TFirst First, TSecond Second)> Zip( this IEnumerable source, IEnumerable first) { diff --git a/src/Spectre.Console/Extensions/StringBuilderExtensions.cs b/src/Spectre.Console/Extensions/StringBuilderExtensions.cs index 49b2367..cba13aa 100644 --- a/src/Spectre.Console/Extensions/StringBuilderExtensions.cs +++ b/src/Spectre.Console/Extensions/StringBuilderExtensions.cs @@ -26,7 +26,7 @@ internal static class StringBuilderExtensions public static void AppendSpan(this StringBuilder builder, ReadOnlySpan span) { // NetStandard 2 lacks the override for StringBuilder to add the span. We'll need to convert the span - // to a string for it, but for .NET 5.0 or newer we'll use the override. + // to a string for it, but for .NET 6.0 or newer we'll use the override. #if NETSTANDARD2_0 builder.Append(span.ToString()); #else diff --git a/src/Spectre.Console/Internal/Colors/ColorSystemDetector.cs b/src/Spectre.Console/Internal/Colors/ColorSystemDetector.cs index 67d8c71..82ee90f 100644 --- a/src/Spectre.Console/Internal/Colors/ColorSystemDetector.cs +++ b/src/Spectre.Console/Internal/Colors/ColorSystemDetector.cs @@ -64,8 +64,8 @@ internal static class ColorSystemDetector return false; } -#if NET5_0_OR_GREATER - // The reason we're not always using this, is because it will return wrong values on other runtimes than .NET 5+ +#if NET6_0_OR_GREATER + // The reason we're not always using this, is because it will return wrong values on other runtimes than .NET 6+ // See https://docs.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/5.0/environment-osversion-returns-correct-version var version = Environment.OSVersion.Version; major = version.Major; diff --git a/src/Spectre.Console/Spectre.Console.csproj b/src/Spectre.Console/Spectre.Console.csproj index ac3494f..d3ec1c9 100644 --- a/src/Spectre.Console/Spectre.Console.csproj +++ b/src/Spectre.Console/Spectre.Console.csproj @@ -1,7 +1,7 @@ - net6.0;netstandard2.0 + net7.0;net6.0;netstandard2.0 enable true SA1633 @@ -19,7 +19,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/test/Directory.Build.props b/test/Directory.Build.props index 88ea545..7d0d62a 100644 --- a/test/Directory.Build.props +++ b/test/Directory.Build.props @@ -9,7 +9,7 @@ All - + All diff --git a/test/Spectre.Console.Cli.Tests/Spectre.Console.Cli.Tests.csproj b/test/Spectre.Console.Cli.Tests/Spectre.Console.Cli.Tests.csproj index 06e7fc7..67f5874 100644 --- a/test/Spectre.Console.Cli.Tests/Spectre.Console.Cli.Tests.csproj +++ b/test/Spectre.Console.Cli.Tests/Spectre.Console.Cli.Tests.csproj @@ -1,8 +1,8 @@ - net6.0;net48 - net6.0 + net7.0;net48 + net7.0 @@ -14,10 +14,9 @@ - - - - + + + all @@ -31,15 +30,15 @@ - - - $([System.String]::Copy('%(FileName)').Split('.')[0]) - %(ParentFile).cs - - - $([System.String]::Copy('%(FileName)').Split('.')[0]) - %(ParentFile).cs - + + + $([System.String]::Copy('%(FileName)').Split('.')[0]) + %(ParentFile).cs + + + $([System.String]::Copy('%(FileName)').Split('.')[0]) + %(ParentFile).cs + diff --git a/test/Spectre.Console.Cli.Tests/Utilities/ModuleInitializerAttribute.cs b/test/Spectre.Console.Cli.Tests/Utilities/ModuleInitializerAttribute.cs index 6f93cb4..5b84da2 100644 --- a/test/Spectre.Console.Cli.Tests/Utilities/ModuleInitializerAttribute.cs +++ b/test/Spectre.Console.Cli.Tests/Utilities/ModuleInitializerAttribute.cs @@ -1,4 +1,4 @@ -#if !NET5_0_OR_GREATER +#if !NET6_0_OR_GREATER namespace System.Runtime.CompilerServices; [AttributeUsage(AttributeTargets.Method, Inherited = false)] diff --git a/test/Spectre.Console.Cli.Tests/VerifyConfiguration.cs b/test/Spectre.Console.Cli.Tests/VerifyConfiguration.cs index 770ec2b..b3261c2 100644 --- a/test/Spectre.Console.Cli.Tests/VerifyConfiguration.cs +++ b/test/Spectre.Console.Cli.Tests/VerifyConfiguration.cs @@ -5,6 +5,6 @@ public static class VerifyConfiguration [ModuleInitializer] public static void Init() { - VerifierSettings.DerivePathInfo(Expectations.Initialize); + Verifier.DerivePathInfo(Expectations.Initialize); } } diff --git a/test/Spectre.Console.Tests/Spectre.Console.Tests.csproj b/test/Spectre.Console.Tests/Spectre.Console.Tests.csproj index c450b02..0342253 100644 --- a/test/Spectre.Console.Tests/Spectre.Console.Tests.csproj +++ b/test/Spectre.Console.Tests/Spectre.Console.Tests.csproj @@ -1,8 +1,8 @@ - net6.0;net48 - net6.0 + net7.0;net48 + net7.0 @@ -18,10 +18,9 @@ - - - - + + + all diff --git a/test/Spectre.Console.Tests/Unit/StyleTests.cs b/test/Spectre.Console.Tests/Unit/StyleTests.cs index 5213ed9..e75ce20 100644 --- a/test/Spectre.Console.Tests/Unit/StyleTests.cs +++ b/test/Spectre.Console.Tests/Unit/StyleTests.cs @@ -302,7 +302,7 @@ public sealed class StyleTests [InlineData("rgb(255)", "Invalid RGB color 'rgb(255)'.")] [InlineData("rgb(255,255)", "Invalid RGB color 'rgb(255,255)'.")] [InlineData("rgb(255,255,255", "Invalid RGB color 'rgb(255,255,255'.")] - [InlineData("rgb(A,B,C)", "Invalid RGB color 'rgb(A,B,C)'. Input string was not in a correct format.")] + [InlineData("rgb(A,B,C)", "Invalid RGB color 'rgb(A,B,C)'.")] public void Should_Return_Error_If_Rgb_Color_Is_Invalid(string style, string expected) { // Given, When @@ -310,7 +310,7 @@ public sealed class StyleTests // Then result.ShouldNotBeNull(); - result.Message.ShouldBe(expected); + result.Message.ShouldStartWith(expected); } } diff --git a/test/Spectre.Console.Tests/Utilities/ModuleInitializerAttribute.cs b/test/Spectre.Console.Tests/Utilities/ModuleInitializerAttribute.cs index 6f93cb4..5b84da2 100644 --- a/test/Spectre.Console.Tests/Utilities/ModuleInitializerAttribute.cs +++ b/test/Spectre.Console.Tests/Utilities/ModuleInitializerAttribute.cs @@ -1,4 +1,4 @@ -#if !NET5_0_OR_GREATER +#if !NET6_0_OR_GREATER namespace System.Runtime.CompilerServices; [AttributeUsage(AttributeTargets.Method, Inherited = false)] diff --git a/test/Spectre.Console.Tests/VerifyConfiguration.cs b/test/Spectre.Console.Tests/VerifyConfiguration.cs index 770ec2b..b3261c2 100644 --- a/test/Spectre.Console.Tests/VerifyConfiguration.cs +++ b/test/Spectre.Console.Tests/VerifyConfiguration.cs @@ -5,6 +5,6 @@ public static class VerifyConfiguration [ModuleInitializer] public static void Init() { - VerifierSettings.DerivePathInfo(Expectations.Initialize); + Verifier.DerivePathInfo(Expectations.Initialize); } }