mirror of
				https://github.com/nsnail/spectre.console.git
				synced 2025-11-01 01:25:27 +08:00 
			
		
		
		
	Add support for .NET 7.0
This commit is contained in:
		 Patrik Svensson
					Patrik Svensson
				
			
				
					committed by
					
						 Patrik Svensson
						Patrik Svensson
					
				
			
			
				
	
			
			
			 Patrik Svensson
						Patrik Svensson
					
				
			
						parent
						
							02f9d26473
						
					
				
				
					commit
					7dce4af552
				
			| @@ -4,7 +4,7 @@ _[  برای پایتون، بسیار الهام گرفته شده است. | از کتابخانه عالی [Rich](https://github.com/willmcgugan/rich)  برای پایتون، بسیار الهام گرفته شده است. | ||||||
|  |  | ||||||
| ## فهرست | ## فهرست | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
| _[](https://www.nuget.org/packages/spectre.console)_ | _[](https://www.nuget.org/packages/spectre.console)_ | ||||||
|  |  | ||||||
| 綺麗なコンソールアプリケーションを簡単に作成するための.NET Standard 2.0ライブラリです。 | 綺麗なコンソールアプリケーションを簡単に作成するための.NETライブラリです。 | ||||||
| Python用の素晴らしい[Rich ライブラリ](https://github.com/willmcgugan/rich)に強く影響を受けています。 | Python用の素晴らしい[Rich ライブラリ](https://github.com/willmcgugan/rich)に強く影響を受けています。 | ||||||
|  |  | ||||||
| ## 目次 | ## 目次 | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
| _[](https://www.nuget.org/packages/spectre.console)_ _[](https://www.nuget.org/packages/spectre.console.cli)_ [](https://app.netlify.com/sites/spectreconsole/deploys) | _[](https://www.nuget.org/packages/spectre.console)_ _[](https://www.nuget.org/packages/spectre.console.cli)_ [](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)  | 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/) | for Python. For detailed usage instructions, [please refer to the documentation at https://spectreconsole.net/.](https://spectreconsole.net/) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
| _[](https://www.nuget.org/packages/spectre.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)  | É fortemente inspirada na excelente [biblioteca Rich](https://github.com/willmcgugan/rich)  | ||||||
| para Python. | para Python. | ||||||
|  |  | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
| _[](https://www.nuget.org/packages/spectre.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优秀库的启发。 | 深受 [Rich](https://github.com/willmcgugan/rich) 这个Python优秀库的启发。 | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										10
									
								
								build.cake
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								build.cake
									
									
									
									
									
								
							| @@ -17,7 +17,7 @@ Task("Build") | |||||||
|     DotNetBuild("./src/Spectre.Console.sln", new DotNetBuildSettings { |     DotNetBuild("./src/Spectre.Console.sln", new DotNetBuildSettings { | ||||||
|         Configuration = configuration, |         Configuration = configuration, | ||||||
|         NoIncremental = context.HasArgument("rebuild"), |         NoIncremental = context.HasArgument("rebuild"), | ||||||
|         MSBuildSettings = new DotNetCoreMSBuildSettings() |         MSBuildSettings = new DotNetMSBuildSettings() | ||||||
|             .TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error) |             .TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error) | ||||||
|     }); |     }); | ||||||
| }); | }); | ||||||
| @@ -29,7 +29,7 @@ Task("Build-Analyzer") | |||||||
|     DotNetBuild("./src/Spectre.Console.Analyzer.sln", new DotNetBuildSettings { |     DotNetBuild("./src/Spectre.Console.Analyzer.sln", new DotNetBuildSettings { | ||||||
|         Configuration = configuration, |         Configuration = configuration, | ||||||
|         NoIncremental = context.HasArgument("rebuild"), |         NoIncremental = context.HasArgument("rebuild"), | ||||||
|         MSBuildSettings = new DotNetCoreMSBuildSettings() |         MSBuildSettings = new DotNetMSBuildSettings() | ||||||
|             .TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error) |             .TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error) | ||||||
|     }); |     }); | ||||||
| }); | }); | ||||||
| @@ -41,7 +41,7 @@ Task("Build-Examples") | |||||||
|     DotNetBuild("./examples/Examples.sln", new DotNetBuildSettings { |     DotNetBuild("./examples/Examples.sln", new DotNetBuildSettings { | ||||||
|         Configuration = configuration, |         Configuration = configuration, | ||||||
|         NoIncremental = context.HasArgument("rebuild"), |         NoIncremental = context.HasArgument("rebuild"), | ||||||
|         MSBuildSettings = new DotNetCoreMSBuildSettings() |         MSBuildSettings = new DotNetMSBuildSettings() | ||||||
|             .TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error) |             .TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error) | ||||||
|     }); |     }); | ||||||
| }); | }); | ||||||
| @@ -80,7 +80,7 @@ Task("Package") | |||||||
|         NoRestore = true, |         NoRestore = true, | ||||||
|         NoBuild = true, |         NoBuild = true, | ||||||
|         OutputDirectory = "./.artifacts", |         OutputDirectory = "./.artifacts", | ||||||
|         MSBuildSettings = new DotNetCoreMSBuildSettings() |         MSBuildSettings = new DotNetMSBuildSettings() | ||||||
|             .TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error) |             .TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error) | ||||||
|     }); |     }); | ||||||
|  |  | ||||||
| @@ -89,7 +89,7 @@ Task("Package") | |||||||
|         NoRestore = true, |         NoRestore = true, | ||||||
|         NoBuild = true, |         NoBuild = true, | ||||||
|         OutputDirectory = "./.artifacts", |         OutputDirectory = "./.artifacts", | ||||||
|         MSBuildSettings = new DotNetCoreMSBuildSettings() |         MSBuildSettings = new DotNetMSBuildSettings() | ||||||
|             .TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error) |             .TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error) | ||||||
|     }); |     }); | ||||||
| }); | }); | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory> |     <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory> | ||||||
|     <DefaultItemExcludes>$(DefaultItemExcludes);output\**;.gitignore</DefaultItemExcludes> |     <DefaultItemExcludes>$(DefaultItemExcludes);output\**;.gitignore</DefaultItemExcludes> | ||||||
|     <NoWarn>MVC1000</NoWarn> |     <NoWarn>MVC1000</NoWarn> | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| # Documentation | # 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 | ## Running Preview Site | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| { | { | ||||||
|   "sdk": { |   "sdk": { | ||||||
|     "version": "6.0.300", |     "version": "7.0.100", | ||||||
|     "rollForward": "latestFeature" |     "rollForward": "latestFeature" | ||||||
|   } |   } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -17,7 +17,7 @@ | |||||||
|  |  | ||||||
|     @{ |     @{ | ||||||
|         string title = Document.ContainsKey(Keys.Title) ? $"Spectre.Console - {Document.GetString(Keys.Title)}" : "Spectre.Console"; |         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 card = Context.FindCard(Model.Id); | ||||||
|         var urlBase = $"https://{Document.GetString(Keys.Host)}/"; |         var urlBase = $"https://{Document.GetString(Keys.Host)}/"; | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -1,9 +1,9 @@ | |||||||
| Title: Welcome! | 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 | 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.  | to create beautiful console applications.  | ||||||
|  |  | ||||||
| ## Spectre.Console.AnsiConsole Features | ## Spectre.Console.AnsiConsole Features | ||||||
|   | |||||||
| @@ -15,7 +15,7 @@ | |||||||
|  |  | ||||||
|   <div id="container"> |   <div id="container"> | ||||||
|     <div id="console"> |     <div id="console"> | ||||||
|         <div class="line"><span style="color:var(--brightBlack)">╭─</span><span style="color:var(--folder)"></span><span style="background-color:var(--folder);color:var(--black)"> ~/spectre.console</span><span style="color:var(--folder);background-color:var(--dotnet)"></span><span style="background-color:var(--blue)"> .NET 6.0 </span><span style="color:var(--dotnet);background-color:var(--git)"></span><span style="background-color:var(--git);color:var(--background)">  main </span><span style="color:var(--git)"></span></div> |         <div class="line"><span style="color:var(--brightBlack)">╭─</span><span style="color:var(--folder)"></span><span style="background-color:var(--folder);color:var(--black)"> ~/spectre.console</span><span style="color:var(--folder);background-color:var(--dotnet)"></span><span style="background-color:var(--blue)"> .NET 7.0 </span><span style="color:var(--dotnet);background-color:var(--git)"></span><span style="background-color:var(--git);color:var(--background)">  main </span><span style="color:var(--git)"></span></div> | ||||||
|         <div class="line"><span style="color:var(--brightBlack)">╰─</span> dotnet run</div> |         <div class="line"><span style="color:var(--brightBlack)">╰─</span> dotnet run</div> | ||||||
|         <div class="line"></div> |         <div class="line"></div> | ||||||
|         <div class="line">╭────────────────────────────────────────────────────────╮</div> |         <div class="line">╭────────────────────────────────────────────────────────╮</div> | ||||||
|   | |||||||
| @@ -3,7 +3,7 @@ | |||||||
|   "isRoot": true, |   "isRoot": true, | ||||||
|   "tools": { |   "tools": { | ||||||
|     "cake.tool": { |     "cake.tool": { | ||||||
|       "version": "2.3.0", |       "version": "3.0.0", | ||||||
|       "commands": [ |       "commands": [ | ||||||
|         "dotnet-cake" |         "dotnet-cake" | ||||||
|       ] |       ] | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <IsPackable>false</IsPackable> |     <IsPackable>false</IsPackable> | ||||||
|     <ExampleName>Delegates</ExampleName> |     <ExampleName>Delegates</ExampleName> | ||||||
|     <ExampleDescription>Demonstrates how to specify commands as delegates.</ExampleDescription> |     <ExampleDescription>Demonstrates how to specify commands as delegates.</ExampleDescription> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <IsPackable>false</IsPackable> |     <IsPackable>false</IsPackable> | ||||||
|     <ExampleName>Demo</ExampleName> |     <ExampleName>Demo</ExampleName> | ||||||
|     <ExampleDescription>Demonstrates the most common use cases of Spectre.Cli.</ExampleDescription> |     <ExampleDescription>Demonstrates the most common use cases of Spectre.Cli.</ExampleDescription> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <IsPackable>false</IsPackable> |     <IsPackable>false</IsPackable> | ||||||
|     <ExampleName>Dynamic</ExampleName> |     <ExampleName>Dynamic</ExampleName> | ||||||
|     <ExampleDescription>Demonstrates how to define dynamic commands.</ExampleDescription> |     <ExampleDescription>Demonstrates how to define dynamic commands.</ExampleDescription> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <IsPackable>false</IsPackable> |     <IsPackable>false</IsPackable> | ||||||
|     <ExampleName>Injection</ExampleName> |     <ExampleName>Injection</ExampleName> | ||||||
|     <ExampleDescription>Demonstrates how to use dependency injection with Spectre.Cli.</ExampleDescription> |     <ExampleDescription>Demonstrates how to use dependency injection with Spectre.Cli.</ExampleDescription> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <IsPackable>false</IsPackable> |     <IsPackable>false</IsPackable> | ||||||
|     <ExampleName>Logging</ExampleName> |     <ExampleName>Logging</ExampleName> | ||||||
|     <ExampleDescription>Demonstrates how to dynamically configure Serilog for logging using parameters from a command.</ExampleDescription> |     <ExampleDescription>Demonstrates how to dynamically configure Serilog for logging using parameters from a command.</ExampleDescription> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <ExampleTitle>Screens</ExampleTitle> |     <ExampleTitle>Screens</ExampleTitle> | ||||||
|     <ExampleDescription>Demonstrates how to use alternate screens.</ExampleDescription> |     <ExampleDescription>Demonstrates how to use alternate screens.</ExampleDescription> | ||||||
|     <ExampleGroup>Widgets</ExampleGroup> |     <ExampleGroup>Widgets</ExampleGroup> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <ExampleTitle>Borders</ExampleTitle> |     <ExampleTitle>Borders</ExampleTitle> | ||||||
|     <ExampleDescription>Demonstrates the different kind of borders.</ExampleDescription> |     <ExampleDescription>Demonstrates the different kind of borders.</ExampleDescription> | ||||||
|     <ExampleGroup>Widgets</ExampleGroup> |     <ExampleGroup>Widgets</ExampleGroup> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <ExampleTitle>Calendars</ExampleTitle> |     <ExampleTitle>Calendars</ExampleTitle> | ||||||
|     <ExampleDescription>Demonstrates how to render calendars.</ExampleDescription> |     <ExampleDescription>Demonstrates how to render calendars.</ExampleDescription> | ||||||
|     <ExampleGroup>Widgets</ExampleGroup> |     <ExampleGroup>Widgets</ExampleGroup> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <ExampleTitle>Canvas</ExampleTitle> |     <ExampleTitle>Canvas</ExampleTitle> | ||||||
|     <ExampleDescription>Demonstrates how to render pixels and images.</ExampleDescription> |     <ExampleDescription>Demonstrates how to render pixels and images.</ExampleDescription> | ||||||
|     <ExampleGroup>Widgets</ExampleGroup> |     <ExampleGroup>Widgets</ExampleGroup> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <ExampleTitle>Charts</ExampleTitle> |     <ExampleTitle>Charts</ExampleTitle> | ||||||
|     <ExampleDescription>Demonstrates how to render charts in a console.</ExampleDescription> |     <ExampleDescription>Demonstrates how to render charts in a console.</ExampleDescription> | ||||||
|     <ExampleGroup>Widgets</ExampleGroup> |     <ExampleGroup>Widgets</ExampleGroup> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <ExampleTitle>Colors</ExampleTitle> |     <ExampleTitle>Colors</ExampleTitle> | ||||||
|     <ExampleDescription>Demonstrates how to use [yellow]c[/][red]o[/][green]l[/][blue]o[/][aqua]r[/][lime]s[/] in the console.</ExampleDescription> |     <ExampleDescription>Demonstrates how to use [yellow]c[/][red]o[/][green]l[/][blue]o[/][aqua]r[/][lime]s[/] in the console.</ExampleDescription> | ||||||
|     <ExampleGroup>Misc</ExampleGroup> |     <ExampleGroup>Misc</ExampleGroup> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <ExampleTitle>Columns</ExampleTitle> |     <ExampleTitle>Columns</ExampleTitle> | ||||||
|     <ExampleDescription>Demonstrates how to render data into columns.</ExampleDescription> |     <ExampleDescription>Demonstrates how to render data into columns.</ExampleDescription> | ||||||
|     <ExampleGroup>Widgets</ExampleGroup> |     <ExampleGroup>Widgets</ExampleGroup> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <ExampleTitle>Cursor</ExampleTitle> |     <ExampleTitle>Cursor</ExampleTitle> | ||||||
|     <ExampleDescription>Demonstrates how to move the cursor.</ExampleDescription> |     <ExampleDescription>Demonstrates how to move the cursor.</ExampleDescription> | ||||||
|     <ExampleGroup>Misc</ExampleGroup> |     <ExampleGroup>Misc</ExampleGroup> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <ExampleTitle>Emojis</ExampleTitle> |     <ExampleTitle>Emojis</ExampleTitle> | ||||||
|     <ExampleDescription>Demonstrates how to render emojis.</ExampleDescription> |     <ExampleDescription>Demonstrates how to render emojis.</ExampleDescription> | ||||||
|     <ExampleGroup>Misc</ExampleGroup> |     <ExampleGroup>Misc</ExampleGroup> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <ExampleTitle>Exceptions</ExampleTitle> |     <ExampleTitle>Exceptions</ExampleTitle> | ||||||
|     <ExampleDescription>Demonstrates how to render formatted exceptions.</ExampleDescription> |     <ExampleDescription>Demonstrates how to render formatted exceptions.</ExampleDescription> | ||||||
|     <ExampleGroup>Misc</ExampleGroup> |     <ExampleGroup>Misc</ExampleGroup> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <ExampleTitle>Figlet</ExampleTitle> |     <ExampleTitle>Figlet</ExampleTitle> | ||||||
|     <ExampleDescription>Demonstrates how to render FIGlet text.</ExampleDescription> |     <ExampleDescription>Demonstrates how to render FIGlet text.</ExampleDescription> | ||||||
|     <ExampleGroup>Widgets</ExampleGroup> |     <ExampleGroup>Widgets</ExampleGroup> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <ExampleTitle>Grids</ExampleTitle> |     <ExampleTitle>Grids</ExampleTitle> | ||||||
|     <ExampleDescription>Demonstrates how to render grids in a console.</ExampleDescription> |     <ExampleDescription>Demonstrates how to render grids in a console.</ExampleDescription> | ||||||
|     <ExampleGroup>Widgets</ExampleGroup> |     <ExampleGroup>Widgets</ExampleGroup> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <ExampleTitle>Info</ExampleTitle> |     <ExampleTitle>Info</ExampleTitle> | ||||||
|     <ExampleDescription>Displays the capabilities of the current console.</ExampleDescription> |     <ExampleDescription>Displays the capabilities of the current console.</ExampleDescription> | ||||||
|     <ExampleGroup>Misc</ExampleGroup> |     <ExampleGroup>Misc</ExampleGroup> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <ExampleTitle>Links</ExampleTitle> |     <ExampleTitle>Links</ExampleTitle> | ||||||
|     <ExampleDescription>Demonstrates how to render links in a console.</ExampleDescription> |     <ExampleDescription>Demonstrates how to render links in a console.</ExampleDescription> | ||||||
|     <ExampleGroup>Misc</ExampleGroup> |     <ExampleGroup>Misc</ExampleGroup> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <ExampleTitle>Live</ExampleTitle> |     <ExampleTitle>Live</ExampleTitle> | ||||||
|     <ExampleDescription>Demonstrates how to do live updates.</ExampleDescription> |     <ExampleDescription>Demonstrates how to do live updates.</ExampleDescription> | ||||||
|     <ExampleGroup>Live</ExampleGroup> |     <ExampleGroup>Live</ExampleGroup> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <ExampleTitle>LiveTable</ExampleTitle> |     <ExampleTitle>LiveTable</ExampleTitle> | ||||||
|     <ExampleDescription>Demonstrates how to do live updates in a table.</ExampleDescription> |     <ExampleDescription>Demonstrates how to do live updates in a table.</ExampleDescription> | ||||||
|     <ExampleGroup>Live</ExampleGroup> |     <ExampleGroup>Live</ExampleGroup> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <ImplicitUsings>enable</ImplicitUsings> |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|     <ExampleTitle>Minimal</ExampleTitle> |     <ExampleTitle>Minimal</ExampleTitle> | ||||||
|     <ExampleDescription>Demonstrates a minimal console application.</ExampleDescription> |     <ExampleDescription>Demonstrates a minimal console application.</ExampleDescription> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <ExampleTitle>Panels</ExampleTitle> |     <ExampleTitle>Panels</ExampleTitle> | ||||||
|     <ExampleDescription>Demonstrates how to render items in panels.</ExampleDescription> |     <ExampleDescription>Demonstrates how to render items in panels.</ExampleDescription> | ||||||
|     <ExampleGroup>Widgets</ExampleGroup> |     <ExampleGroup>Widgets</ExampleGroup> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <ExampleTitle>Paths</ExampleTitle> |     <ExampleTitle>Paths</ExampleTitle> | ||||||
|     <ExampleDescription>Demonstrates how to render paths.</ExampleDescription> |     <ExampleDescription>Demonstrates how to render paths.</ExampleDescription> | ||||||
|     <ExampleGroup>Widgets</ExampleGroup> |     <ExampleGroup>Widgets</ExampleGroup> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <ExampleTitle>Progress</ExampleTitle> |     <ExampleTitle>Progress</ExampleTitle> | ||||||
|     <ExampleDescription>Demonstrates how to show progress bars.</ExampleDescription> |     <ExampleDescription>Demonstrates how to show progress bars.</ExampleDescription> | ||||||
|     <ExampleGroup>Status</ExampleGroup> |     <ExampleGroup>Status</ExampleGroup> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <LangVersion>9</LangVersion> |     <LangVersion>9</LangVersion> | ||||||
|     <ExampleTitle>Prompt</ExampleTitle> |     <ExampleTitle>Prompt</ExampleTitle> | ||||||
|     <ExampleDescription>Demonstrates how to get input from a user.</ExampleDescription> |     <ExampleDescription>Demonstrates how to get input from a user.</ExampleDescription> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <ExampleTitle>Rules</ExampleTitle> |     <ExampleTitle>Rules</ExampleTitle> | ||||||
|     <ExampleDescription>Demonstrates how to render horizontal rules (lines).</ExampleDescription> |     <ExampleDescription>Demonstrates how to render horizontal rules (lines).</ExampleDescription> | ||||||
|     <ExampleGroup>Widgets</ExampleGroup> |     <ExampleGroup>Widgets</ExampleGroup> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <ExampleTitle>Showcase</ExampleTitle> |     <ExampleTitle>Showcase</ExampleTitle> | ||||||
|     <ExampleDescription>Demonstation of Spectre.Console.</ExampleDescription> |     <ExampleDescription>Demonstation of Spectre.Console.</ExampleDescription> | ||||||
|     <ExampleGroup>Misc</ExampleGroup> |     <ExampleGroup>Misc</ExampleGroup> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <ExampleTitle>Status</ExampleTitle> |     <ExampleTitle>Status</ExampleTitle> | ||||||
|     <ExampleDescription>Demonstrates how to show status updates.</ExampleDescription> |     <ExampleDescription>Demonstrates how to show status updates.</ExampleDescription> | ||||||
|     <ExampleGroup>Status</ExampleGroup> |     <ExampleGroup>Status</ExampleGroup> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <ExampleTitle>Tables</ExampleTitle> |     <ExampleTitle>Tables</ExampleTitle> | ||||||
|     <ExampleDescription>Demonstrates how to render tables in a console.</ExampleDescription> |     <ExampleDescription>Demonstrates how to render tables in a console.</ExampleDescription> | ||||||
|     <ExampleGroup>Widgets</ExampleGroup> |     <ExampleGroup>Widgets</ExampleGroup> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <ExampleTitle>Trees</ExampleTitle> |     <ExampleTitle>Trees</ExampleTitle> | ||||||
|     <ExampleDescription>Demonstrates how to render trees in a console.</ExampleDescription> |     <ExampleDescription>Demonstrates how to render trees in a console.</ExampleDescription> | ||||||
|     <ExampleGroup>Widgets</ExampleGroup> |     <ExampleGroup>Widgets</ExampleGroup> | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| <Project Sdk="Microsoft.NET.Sdk"> | <Project Sdk="Microsoft.NET.Sdk"> | ||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <ExampleVisible>false</ExampleVisible> |     <ExampleVisible>false</ExampleVisible> | ||||||
|     <Nullable>enable</Nullable> |     <Nullable>enable</Nullable> | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
|   | |||||||
| @@ -1,5 +1,5 @@ | |||||||
| { | { | ||||||
|   "sdk": { |   "sdk": { | ||||||
|     "version": "6.0.400" |     "version": "7.0.100" | ||||||
|   } |   } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>netcoreapp3.1</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <LangVersion>default</LangVersion> |     <LangVersion>default</LangVersion> | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
|  |  | ||||||
|   | |||||||
| @@ -32,12 +32,12 @@ | |||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
|    |    | ||||||
|   <ItemGroup Label="Package References"> |   <ItemGroup Label="Package References"> | ||||||
|     <PackageReference Include="MinVer" PrivateAssets="All" Version="4.1.0" /> |     <PackageReference Include="MinVer" PrivateAssets="All" Version="4.2.0" /> | ||||||
|     <PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" Version="1.1.1" /> |     <PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" Version="1.1.1" /> | ||||||
|     <PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435"> |     <PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435"> | ||||||
|       <PrivateAssets>All</PrivateAssets> |       <PrivateAssets>All</PrivateAssets> | ||||||
|     </PackageReference> |     </PackageReference> | ||||||
|     <PackageReference Include="Roslynator.Analyzers" Version="4.1.1"> |     <PackageReference Include="Roslynator.Analyzers" Version="4.1.2"> | ||||||
|       <PrivateAssets>All</PrivateAssets> |       <PrivateAssets>All</PrivateAssets> | ||||||
|     </PackageReference> |     </PackageReference> | ||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <TargetFramework>net6.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|     <AdditionalFiles Include="..\stylecop.json" Link="Properties/stylecop.json" /> |     <AdditionalFiles Include="..\stylecop.json" Link="Properties/stylecop.json" /> | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| <Project Sdk="Microsoft.NET.Sdk"> | <Project Sdk="Microsoft.NET.Sdk"> | ||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks> |     <TargetFrameworks>net7.0;net6.0;netstandard2.0</TargetFrameworks> | ||||||
|     <Nullable>enable</Nullable> |     <Nullable>enable</Nullable> | ||||||
|     <IsPackable>true</IsPackable> |     <IsPackable>true</IsPackable> | ||||||
|     <NoWarn>SA1633</NoWarn> |     <NoWarn>SA1633</NoWarn> | ||||||
| @@ -20,7 +20,7 @@ | |||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|     <PackageReference Include="TunnelVisionLabs.ReferenceAssemblyAnnotator" Version="1.0.0-alpha.160" PrivateAssets="all" /> |     <PackageReference Include="TunnelVisionLabs.ReferenceAssemblyAnnotator" Version="1.0.0-alpha.160" PrivateAssets="all" /> | ||||||
|     <PackageDownload Include="Microsoft.NETCore.App.Ref" Version="[$(AnnotatedReferenceAssemblyVersion)]" /> |     <PackageDownload Include="Microsoft.NETCore.App.Ref" Version="[$(AnnotatedReferenceAssemblyVersion)]" /> | ||||||
|     <PackageReference Include="Nullable" Version="1.3.0"> |     <PackageReference Include="Nullable" Version="1.3.1"> | ||||||
|       <PrivateAssets>all</PrivateAssets> |       <PrivateAssets>all</PrivateAssets> | ||||||
|       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> |       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||||||
|     </PackageReference> |     </PackageReference> | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| <Project Sdk="Microsoft.NET.Sdk"> | <Project Sdk="Microsoft.NET.Sdk"> | ||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks> |     <TargetFrameworks>net7.0;net6.0;netstandard2.0</TargetFrameworks> | ||||||
|     <Nullable>enable</Nullable> |     <Nullable>enable</Nullable> | ||||||
|     <IsPackable>true</IsPackable> |     <IsPackable>true</IsPackable> | ||||||
|     <Description>A library that extends Spectre.Console with ImageSharp superpowers.</Description> |     <Description>A library that extends Spectre.Console with ImageSharp superpowers.</Description> | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| <Project Sdk="Microsoft.NET.Sdk"> | <Project Sdk="Microsoft.NET.Sdk"> | ||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks> |     <TargetFrameworks>net7.0;net6.0;netstandard2.0</TargetFrameworks> | ||||||
|     <IsTestProject>false</IsTestProject> |     <IsTestProject>false</IsTestProject> | ||||||
|     <Nullable>enable</Nullable> |     <Nullable>enable</Nullable> | ||||||
|     <IsPackable>true</IsPackable> |     <IsPackable>true</IsPackable> | ||||||
|   | |||||||
| @@ -110,7 +110,7 @@ internal static class EnumerableExtensions | |||||||
|         return source.Select((value, index) => func(value, index)); |         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<TFirst, TSecond>( |     public static IEnumerable<(TFirst First, TSecond Second)> Zip<TFirst, TSecond>( | ||||||
|         this IEnumerable<TFirst> source, IEnumerable<TSecond> first) |         this IEnumerable<TFirst> source, IEnumerable<TSecond> first) | ||||||
|     { |     { | ||||||
|   | |||||||
| @@ -26,7 +26,7 @@ internal static class StringBuilderExtensions | |||||||
|     public static void AppendSpan(this StringBuilder builder, ReadOnlySpan<char> span) |     public static void AppendSpan(this StringBuilder builder, ReadOnlySpan<char> span) | ||||||
|     { |     { | ||||||
|         // NetStandard 2 lacks the override for StringBuilder to add the span. We'll need to convert the 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 | #if NETSTANDARD2_0 | ||||||
|         builder.Append(span.ToString()); |         builder.Append(span.ToString()); | ||||||
| #else | #else | ||||||
|   | |||||||
| @@ -64,8 +64,8 @@ internal static class ColorSystemDetector | |||||||
|             return false; |             return false; | ||||||
|         } |         } | ||||||
|  |  | ||||||
| #if NET5_0_OR_GREATER | #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 5+ |         // 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 |         // See https://docs.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/5.0/environment-osversion-returns-correct-version | ||||||
|         var version = Environment.OSVersion.Version; |         var version = Environment.OSVersion.Version; | ||||||
|         major = version.Major; |         major = version.Major; | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| <Project Sdk="Microsoft.NET.Sdk"> | <Project Sdk="Microsoft.NET.Sdk"> | ||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks> |     <TargetFrameworks>net7.0;net6.0;netstandard2.0</TargetFrameworks> | ||||||
|     <Nullable>enable</Nullable> |     <Nullable>enable</Nullable> | ||||||
|     <IsPackable>true</IsPackable> |     <IsPackable>true</IsPackable> | ||||||
|     <NoWarn>SA1633</NoWarn> |     <NoWarn>SA1633</NoWarn> | ||||||
| @@ -19,7 +19,7 @@ | |||||||
|     <PackageReference Include="System.Memory" Version="4.5.5" /> |     <PackageReference Include="System.Memory" Version="4.5.5" /> | ||||||
|     <PackageReference Include="TunnelVisionLabs.ReferenceAssemblyAnnotator" Version="1.0.0-alpha.160" PrivateAssets="all" /> |     <PackageReference Include="TunnelVisionLabs.ReferenceAssemblyAnnotator" Version="1.0.0-alpha.160" PrivateAssets="all" /> | ||||||
|     <PackageDownload Include="Microsoft.NETCore.App.Ref" Version="[$(AnnotatedReferenceAssemblyVersion)]" /> |     <PackageDownload Include="Microsoft.NETCore.App.Ref" Version="[$(AnnotatedReferenceAssemblyVersion)]" /> | ||||||
|     <PackageReference Include="Nullable" Version="1.3.0"> |     <PackageReference Include="Nullable" Version="1.3.1"> | ||||||
|       <PrivateAssets>all</PrivateAssets> |       <PrivateAssets>all</PrivateAssets> | ||||||
|       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> |       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||||||
|     </PackageReference> |     </PackageReference> | ||||||
|   | |||||||
| @@ -9,7 +9,7 @@ | |||||||
|     <PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435"> |     <PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435"> | ||||||
|       <PrivateAssets>All</PrivateAssets> |       <PrivateAssets>All</PrivateAssets> | ||||||
|     </PackageReference> |     </PackageReference> | ||||||
|     <PackageReference Include="Roslynator.Analyzers" Version="4.1.1"> |     <PackageReference Include="Roslynator.Analyzers" Version="4.1.2"> | ||||||
|       <PrivateAssets>All</PrivateAssets> |       <PrivateAssets>All</PrivateAssets> | ||||||
|     </PackageReference> |     </PackageReference> | ||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
|   | |||||||
| @@ -1,8 +1,8 @@ | |||||||
| <Project Sdk="Microsoft.NET.Sdk"> | <Project Sdk="Microsoft.NET.Sdk"> | ||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('Windows'))">net6.0;net48</TargetFrameworks> |     <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('Windows'))">net7.0;net48</TargetFrameworks> | ||||||
|     <TargetFrameworks Condition="!$([MSBuild]::IsOSPlatform('Windows'))">net6.0</TargetFrameworks> |     <TargetFrameworks Condition="!$([MSBuild]::IsOSPlatform('Windows'))">net7.0</TargetFrameworks> | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
|  |  | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
| @@ -14,10 +14,9 @@ | |||||||
|     <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.XUnit" Version="1.1.0" /> |     <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.XUnit" Version="1.1.0" /> | ||||||
|     <PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing.XUnit" Version="1.1.0" /> |     <PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing.XUnit" Version="1.1.0" /> | ||||||
|     <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="2.6.1" /> |     <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="2.6.1" /> | ||||||
|     <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" /> |     <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" /> | ||||||
|     <PackageReference Include="Shouldly" Version="4.0.3" /> |     <PackageReference Include="Shouldly" Version="4.1.0" /> | ||||||
|     <PackageReference Include="Spectre.Verify.Extensions" Version="17.1.6" /> |     <PackageReference Include="Spectre.Verify.Extensions" Version="18.0.0" /> | ||||||
|     <PackageReference Include="Verify.Xunit" Version="17.1.6" /> |  | ||||||
|     <PackageReference Include="xunit" Version="2.4.2" /> |     <PackageReference Include="xunit" Version="2.4.2" /> | ||||||
|     <PackageReference Include="xunit.runner.visualstudio" Version="2.4.5"> |     <PackageReference Include="xunit.runner.visualstudio" Version="2.4.5"> | ||||||
|       <PrivateAssets>all</PrivateAssets> |       <PrivateAssets>all</PrivateAssets> | ||||||
|   | |||||||
| @@ -1,4 +1,4 @@ | |||||||
| #if !NET5_0_OR_GREATER | #if !NET6_0_OR_GREATER | ||||||
| namespace System.Runtime.CompilerServices; | namespace System.Runtime.CompilerServices; | ||||||
|  |  | ||||||
| [AttributeUsage(AttributeTargets.Method, Inherited = false)] | [AttributeUsage(AttributeTargets.Method, Inherited = false)] | ||||||
|   | |||||||
| @@ -5,6 +5,6 @@ public static class VerifyConfiguration | |||||||
|     [ModuleInitializer] |     [ModuleInitializer] | ||||||
|     public static void Init() |     public static void Init() | ||||||
|     { |     { | ||||||
|         VerifierSettings.DerivePathInfo(Expectations.Initialize); |         Verifier.DerivePathInfo(Expectations.Initialize); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -1,8 +1,8 @@ | |||||||
| <Project Sdk="Microsoft.NET.Sdk"> | <Project Sdk="Microsoft.NET.Sdk"> | ||||||
|  |  | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('Windows'))">net6.0;net48</TargetFrameworks> |     <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('Windows'))">net7.0;net48</TargetFrameworks> | ||||||
|     <TargetFrameworks Condition="!$([MSBuild]::IsOSPlatform('Windows'))">net6.0</TargetFrameworks> |     <TargetFrameworks Condition="!$([MSBuild]::IsOSPlatform('Windows'))">net7.0</TargetFrameworks> | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
|  |  | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
| @@ -18,10 +18,9 @@ | |||||||
|     <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.XUnit" Version="1.1.0" /> |     <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.XUnit" Version="1.1.0" /> | ||||||
|     <PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing.XUnit" Version="1.1.0" /> |     <PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing.XUnit" Version="1.1.0" /> | ||||||
|     <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="2.6.1" /> |     <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="2.6.1" /> | ||||||
|     <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" /> |     <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" /> | ||||||
|     <PackageReference Include="Shouldly" Version="4.0.3" /> |     <PackageReference Include="Shouldly" Version="4.1.0" /> | ||||||
|     <PackageReference Include="Spectre.Verify.Extensions" Version="17.1.6" /> |     <PackageReference Include="Spectre.Verify.Extensions" Version="18.0.0" /> | ||||||
|     <PackageReference Include="Verify.Xunit" Version="17.1.6" /> |  | ||||||
|     <PackageReference Include="xunit" Version="2.4.2" /> |     <PackageReference Include="xunit" Version="2.4.2" /> | ||||||
|     <PackageReference Include="xunit.runner.visualstudio" Version="2.4.5"> |     <PackageReference Include="xunit.runner.visualstudio" Version="2.4.5"> | ||||||
|       <PrivateAssets>all</PrivateAssets> |       <PrivateAssets>all</PrivateAssets> | ||||||
|   | |||||||
| @@ -302,7 +302,7 @@ public sealed class StyleTests | |||||||
|         [InlineData("rgb(255)", "Invalid RGB color 'rgb(255)'.")] |         [InlineData("rgb(255)", "Invalid RGB color 'rgb(255)'.")] | ||||||
|         [InlineData("rgb(255,255)", "Invalid RGB color 'rgb(255,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(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) |         public void Should_Return_Error_If_Rgb_Color_Is_Invalid(string style, string expected) | ||||||
|         { |         { | ||||||
|             // Given, When |             // Given, When | ||||||
| @@ -310,7 +310,7 @@ public sealed class StyleTests | |||||||
|  |  | ||||||
|             // Then |             // Then | ||||||
|             result.ShouldNotBeNull(); |             result.ShouldNotBeNull(); | ||||||
|             result.Message.ShouldBe(expected); |             result.Message.ShouldStartWith(expected); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,4 +1,4 @@ | |||||||
| #if !NET5_0_OR_GREATER | #if !NET6_0_OR_GREATER | ||||||
| namespace System.Runtime.CompilerServices; | namespace System.Runtime.CompilerServices; | ||||||
|  |  | ||||||
| [AttributeUsage(AttributeTargets.Method, Inherited = false)] | [AttributeUsage(AttributeTargets.Method, Inherited = false)] | ||||||
|   | |||||||
| @@ -5,6 +5,6 @@ public static class VerifyConfiguration | |||||||
|     [ModuleInitializer] |     [ModuleInitializer] | ||||||
|     public static void Init() |     public static void Init() | ||||||
|     { |     { | ||||||
|         VerifierSettings.DerivePathInfo(Expectations.Initialize); |         Verifier.DerivePathInfo(Expectations.Initialize); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user