From 287e62910ff82a289e22e554efd85b9377323f87 Mon Sep 17 00:00:00 2001 From: Craig Treasure Date: Fri, 17 Nov 2023 13:44:15 -0800 Subject: [PATCH] Add support for .NET 8 This change adds support for .NET 8. Unlike similar PRs in my other repos, it does not enable artifacts support yet due to an issue with [benchmarkdotnet](https://github.com/dotnet/BenchmarkDotNet/issues/2466). --- .editorconfig | 3 +++ .github/actions/install-tools/action.yml | 1 + eng/DotNetAnalyzers.props | 2 +- eng/DotNetDefaults.props | 2 +- global.json | 2 +- src/Treasure.Utils.Argument/Argument.cs | 4 ++++ src/Treasure.Utils.Argument/Treasure.Utils.Argument.csproj | 2 +- test/Treasure.Utils.Argument.Benchmarks/Combine.ps1 | 6 +++++- test/Treasure.Utils.Argument.Benchmarks/Program.cs | 2 +- test/Treasure.Utils.Argument.Benchmarks/Run.ps1 | 2 +- .../Treasure.Utils.Argument.Benchmarks.csproj | 4 ++-- test/Treasure.Utils.Argument.Tests/ArgumentTests.cs | 2 +- .../Treasure.Utils.Argument.Tests.csproj | 2 +- 13 files changed, 23 insertions(+), 11 deletions(-) diff --git a/.editorconfig b/.editorconfig index 8f8b291..96a2023 100644 --- a/.editorconfig +++ b/.editorconfig @@ -178,6 +178,9 @@ csharp_style_expression_bodied_constructors = when_on_single_line #prefer expression-bodied members for properties csharp_style_expression_bodied_properties = when_on_single_line +#IDE0290: Use Primary Constructors +csharp_style_prefer_primary_constructors = false + #Style - expression level options #prefer out variables to be declared before the method call diff --git a/.github/actions/install-tools/action.yml b/.github/actions/install-tools/action.yml index cbacc76..3d56292 100644 --- a/.github/actions/install-tools/action.yml +++ b/.github/actions/install-tools/action.yml @@ -9,6 +9,7 @@ runs: dotnet-version: | 6.x 7.x + 8.x - name: Install .NET tools shell: pwsh diff --git a/eng/DotNetAnalyzers.props b/eng/DotNetAnalyzers.props index 8495bd2..10191c6 100644 --- a/eng/DotNetAnalyzers.props +++ b/eng/DotNetAnalyzers.props @@ -7,7 +7,7 @@ true AllEnabledByDefault true - 7.0 + 8.0 diff --git a/eng/DotNetDefaults.props b/eng/DotNetDefaults.props index 96330a4..6bf86fd 100644 --- a/eng/DotNetDefaults.props +++ b/eng/DotNetDefaults.props @@ -10,7 +10,7 @@ - 11.0 + 12.0