From adc0cf346b9e9bafe121c8b21e36393d43cfe910 Mon Sep 17 00:00:00 2001 From: Bradley Grainger Date: Fri, 12 Jan 2024 08:27:23 -0800 Subject: [PATCH] Upgrade build to .NET 8.0. --- .github/workflows/build.yaml | 4 +--- global.json | 6 ++++++ .../Faithlife.Analyzers.Tests.csproj | 2 +- .../Faithlife.Analyzers.Tests/Verifiers/CodeFixVerifier.cs | 4 ++-- tools/Build/Build.csproj | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 global.json diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0fc7285..956bd4a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -28,10 +28,8 @@ jobs: steps: - name: Check out code uses: actions/checkout@v3 - - name: Set up .NET 6 + - name: Set up .NET uses: actions/setup-dotnet@v3 - with: - dotnet-version: 6.0.x - name: Restore run: .\build.ps1 restore - name: Build diff --git a/global.json b/global.json new file mode 100644 index 0000000..391ba3c --- /dev/null +++ b/global.json @@ -0,0 +1,6 @@ +{ + "sdk": { + "version": "8.0.100", + "rollForward": "latestFeature" + } +} diff --git a/tests/Faithlife.Analyzers.Tests/Faithlife.Analyzers.Tests.csproj b/tests/Faithlife.Analyzers.Tests/Faithlife.Analyzers.Tests.csproj index f409173..307a66f 100644 --- a/tests/Faithlife.Analyzers.Tests/Faithlife.Analyzers.Tests.csproj +++ b/tests/Faithlife.Analyzers.Tests/Faithlife.Analyzers.Tests.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 diff --git a/tests/Faithlife.Analyzers.Tests/Verifiers/CodeFixVerifier.cs b/tests/Faithlife.Analyzers.Tests/Verifiers/CodeFixVerifier.cs index 342ba8c..a62974e 100644 --- a/tests/Faithlife.Analyzers.Tests/Verifiers/CodeFixVerifier.cs +++ b/tests/Faithlife.Analyzers.Tests/Verifiers/CodeFixVerifier.cs @@ -80,7 +80,7 @@ private void VerifyFix(string language, DiagnosticAnalyzer analyzer, CodeFixProv var context = new CodeFixContext(document, analyzerDiagnostics[0], (a, d) => actions.Add(a), CancellationToken.None); codeFixProvider.RegisterCodeFixesAsync(context).Wait(); - if (!actions.Any()) + if (actions.Count == 0) { break; } @@ -110,7 +110,7 @@ private void VerifyFix(string language, DiagnosticAnalyzer analyzer, CodeFixProv } // check if there are analyzer diagnostics left after the code fix - if (!analyzerDiagnostics.Any()) + if (analyzerDiagnostics.Length == 0) { break; } diff --git a/tools/Build/Build.csproj b/tools/Build/Build.csproj index 585ebdc..e952196 100644 --- a/tools/Build/Build.csproj +++ b/tools/Build/Build.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net8.0