From 50ac7e3bd3118ddd765e8be689988f45cb0f2ee7 Mon Sep 17 00:00:00 2001 From: Russ Cam Date: Wed, 20 Nov 2024 21:31:59 +1000 Subject: [PATCH] Update to net9.0 (#2) --- .github/workflows/accuracy_report.yml | 2 +- .github/workflows/benchmark.yml | 2 +- .github/workflows/dotnet.yml | 2 +- .github/workflows/release.yml | 2 +- Directory.Packages.props | 24 ++++++++++++------- build/Build/Build.csproj | 2 +- build/Build/Program.cs | 4 ++-- build/Lingua.IO/Lingua.IO.csproj | 2 +- .../Lingua.UnicodeScriptGenerator.csproj | 2 +- global.json | 2 +- src/Lingua/Lingua.csproj | 2 +- .../Lingua.AccuracyReport.Tests.csproj | 2 +- .../Lingua.Benchmarks.csproj | 4 +++- tests/Lingua.Tests/Lingua.Tests.csproj | 3 +-- 14 files changed, 31 insertions(+), 24 deletions(-) diff --git a/.github/workflows/accuracy_report.yml b/.github/workflows/accuracy_report.yml index 3d003a7..820fd01 100644 --- a/.github/workflows/accuracy_report.yml +++ b/.github/workflows/accuracy_report.yml @@ -30,7 +30,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: 8.0.x + dotnet-version: 9.0.x - name: Build Accuracy Report run: ./build.sh report ${{ inputs.lingua && '--implementation Lingua' || '' }} ${{ inputs.language_detection && '--implementation LanguageDetection' || '' }} ${{ inputs.ntextcat && '--implementation NTextCat' || '' }} ${{ inputs.compare && '--compare' || '' }} - name: Write Summary diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 551b015..9e6122d 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -19,7 +19,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: 8.0.x + dotnet-version: 9.0.x - name: Run Benchmarks run: ./build.sh benchmark --filter ${{ inputs.tests }} --exporters GitHub --job Short - name: Write Summary diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index feb80a2..0f79e2a 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -16,7 +16,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: 8.0.x + dotnet-version: 9.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 130a2eb..8f801af 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: 8.0.x + dotnet-version: 9.0.x - name: Pack run: ./build.sh pack diff --git a/Directory.Packages.props b/Directory.Packages.props index 2e0212c..ed3172a 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -1,31 +1,37 @@ + + true + + - + - - - + + + - + - + + + - + - + - + diff --git a/build/Build/Build.csproj b/build/Build/Build.csproj index 4ef28b2..df8c1bb 100644 --- a/build/Build/Build.csproj +++ b/build/Build/Build.csproj @@ -1,6 +1,6 @@  - net8.0 + net9.0 Exe enable enable diff --git a/build/Build/Program.cs b/build/Build/Program.cs index c61d52b..7e109ed 100644 --- a/build/Build/Program.cs +++ b/build/Build/Program.cs @@ -144,9 +144,9 @@ Target(Benchmark, () => { if (targetOptions.Count != 0) - Run("dotnet", "run --project tests/Lingua.Benchmarks -c Release " + string.Join(' ', targetOptions)); + Run("dotnet", "run --project tests/Lingua.Benchmarks --framework net9.0 -c Release " + string.Join(' ', targetOptions)); else - Run("dotnet", "run --project tests/Lingua.Benchmarks -c Release"); + Run("dotnet", "run --project tests/Lingua.Benchmarks --framework net9.0 -c Release"); }); Target(CleanReportOutput, () => diff --git a/build/Lingua.IO/Lingua.IO.csproj b/build/Lingua.IO/Lingua.IO.csproj index d14078f..7f98eca 100644 --- a/build/Lingua.IO/Lingua.IO.csproj +++ b/build/Lingua.IO/Lingua.IO.csproj @@ -2,7 +2,7 @@ Generates training and test data language model files - net8.0 + net8.0;net9.0 enable enable diff --git a/build/Lingua.UnicodeScriptGenerator/Lingua.UnicodeScriptGenerator.csproj b/build/Lingua.UnicodeScriptGenerator/Lingua.UnicodeScriptGenerator.csproj index 2f4fc77..85b4959 100644 --- a/build/Lingua.UnicodeScriptGenerator/Lingua.UnicodeScriptGenerator.csproj +++ b/build/Lingua.UnicodeScriptGenerator/Lingua.UnicodeScriptGenerator.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net9.0 enable enable diff --git a/global.json b/global.json index d07970a..f657889 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.100", + "version": "9.0.100", "rollForward": "latestMajor" } } diff --git a/src/Lingua/Lingua.csproj b/src/Lingua/Lingua.csproj index dd6073f..92f4c2e 100644 --- a/src/Lingua/Lingua.csproj +++ b/src/Lingua/Lingua.csproj @@ -3,7 +3,7 @@ SearchPioneer.Lingua Lingua Natural language detection library for .NET, suitable for long and short text alike - net8.0 + net8.0;net9.0 diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua.AccuracyReport.Tests.csproj b/tests/Lingua.AccuracyReport.Tests/Lingua.AccuracyReport.Tests.csproj index 7dcd791..47dd55e 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua.AccuracyReport.Tests.csproj +++ b/tests/Lingua.AccuracyReport.Tests/Lingua.AccuracyReport.Tests.csproj @@ -1,7 +1,7 @@  - net8.0 + net8.0;net9.0 false true diff --git a/tests/Lingua.Benchmarks/Lingua.Benchmarks.csproj b/tests/Lingua.Benchmarks/Lingua.Benchmarks.csproj index 34ecafa..9011fbb 100644 --- a/tests/Lingua.Benchmarks/Lingua.Benchmarks.csproj +++ b/tests/Lingua.Benchmarks/Lingua.Benchmarks.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net8.0;net9.0 enable disable @@ -13,6 +13,8 @@ + + diff --git a/tests/Lingua.Tests/Lingua.Tests.csproj b/tests/Lingua.Tests/Lingua.Tests.csproj index 7e92f21..f9ffd5a 100644 --- a/tests/Lingua.Tests/Lingua.Tests.csproj +++ b/tests/Lingua.Tests/Lingua.Tests.csproj @@ -1,7 +1,7 @@  - net8.0 + net8.0;net9.0 false true @@ -15,7 +15,6 @@ all runtime; build; native; contentfiles; analyzers -