From f9c04aab20258367a23cdc7c02a6311689554dd2 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Fri, 25 Apr 2025 19:39:15 +0200 Subject: [PATCH] Upgrade dotnet target framework to net10 --- .github/workflows/build-frontends.yml | 4 ++-- .github/workflows/build-ilspy.yml | 18 +++++++++--------- .github/workflows/codeql-analysis.yml | 4 ++-- BuildTools/pre-commit | 4 ++-- .../ICSharpCode.BamlDecompiler.csproj | 6 +++--- ICSharpCode.BamlDecompiler/packages.lock.json | 2 +- .../ICSharpCode.Decompiler.TestRunner.csproj | 2 +- ICSharpCode.Decompiler.Tests/Helpers/Tester.cs | 10 +++++----- .../ICSharpCode.Decompiler.Tests.csproj | 2 +- .../ICSharpCode.Decompiler.csproj | 2 +- .../DecompilerVersionInfo.template.cs | 6 +++--- .../ICSharpCode.ILSpyCmd.csproj | 4 ++-- ICSharpCode.ILSpyCmd/packages.lock.json | 2 +- ICSharpCode.ILSpyX/ICSharpCode.ILSpyX.csproj | 4 ++-- ICSharpCode.ILSpyX/packages.lock.json | 2 +- .../ILSpy.BamlDecompiler.Tests.csproj | 2 +- .../ILSpy.BamlDecompiler.csproj | 2 +- ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj | 2 +- ILSpy.Tests/ILSpy.Tests.csproj | 2 +- ILSpy.sln | 1 + ILSpy/ILSpy.csproj | 2 +- TestPlugin/TestPlugin.csproj | 2 +- global.json | 2 +- 23 files changed, 44 insertions(+), 43 deletions(-) diff --git a/.github/workflows/build-frontends.yml b/.github/workflows/build-frontends.yml index 894202f2c..5db371487 100644 --- a/.github/workflows/build-frontends.yml +++ b/.github/workflows/build-frontends.yml @@ -21,8 +21,8 @@ jobs: - uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.0.x' - dotnet-quality: 'ga' + dotnet-version: '10.0.x' + dotnet-quality: 'preview' - name: Install dependencies run: dotnet restore ILSpy.XPlat.slnf diff --git a/.github/workflows/build-ilspy.yml b/.github/workflows/build-ilspy.yml index cf86850ae..967db1129 100644 --- a/.github/workflows/build-ilspy.yml +++ b/.github/workflows/build-ilspy.yml @@ -34,8 +34,8 @@ jobs: - uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.0.x' - dotnet-quality: 'ga' + dotnet-version: '10.0.x' + dotnet-quality: 'preview' env: DOTNET_INSTALL_DIR: ${{ runner.temp }}/.dotnet DOTNET_ROOT: ${{ runner.temp }}/.dotnet @@ -44,7 +44,7 @@ jobs: uses: microsoft/setup-msbuild@v2 - name: Install dotnet-format - run: dotnet tool install -g dotnet-format --version "8.3.546805" --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json + run: dotnet tool install -g dotnet-format --version "9.0.520307" --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json - name: Install wix (locked version) run: dotnet tool install --global wix --version 6.0.0 @@ -65,9 +65,9 @@ jobs: - name: Execute unit tests run: dotnet test --logger "trx;LogFileName=${{ matrix.configuration }}.trx" --results-directory test-results $env:Tests1 $env:Tests2 $env:Tests3 env: - Tests1: ICSharpCode.Decompiler.Tests\bin\${{ matrix.configuration }}\net8.0-windows\win-x64\ICSharpCode.Decompiler.Tests.dll - Tests2: ILSpy.Tests\bin\${{ matrix.configuration }}\net8.0-windows\ILSpy.Tests.dll - Tests3: ILSpy.BamlDecompiler.Tests\bin\${{ matrix.configuration }}\net8.0-windows\win-x64\ILSpy.BamlDecompiler.Tests.dll + Tests1: ICSharpCode.Decompiler.Tests\bin\${{ matrix.configuration }}\net10.0-windows\win-x64\ICSharpCode.Decompiler.Tests.dll + Tests2: ILSpy.Tests\bin\${{ matrix.configuration }}\net10.0-windows\ILSpy.Tests.dll + Tests3: ILSpy.BamlDecompiler.Tests\bin\${{ matrix.configuration }}\net10.0-windows\win-x64\ILSpy.BamlDecompiler.Tests.dll - name: Upload Test Logs uses: actions/upload-artifact@v4 @@ -94,7 +94,7 @@ jobs: git diff --exit-code - name: Zip ILSpy (framework-dependent) - run: 7z a -tzip $env:StagingDirectory\ILSpy_binaries.zip .\ILSpy\bin\${{ matrix.configuration }}\net8.0-windows\*.dll .\ILSpy\bin\${{ matrix.configuration }}\net8.0-windows\*.exe .\ILSpy\bin\${{ matrix.configuration }}\net8.0-windows\*.config .\ILSpy\bin\${{ matrix.configuration }}\net8.0-windows\*.json .\ILSpy\bin\${{ matrix.configuration }}\net8.0-windows\*\ILSpy.resources.dll .\ILSpy\bin\${{ matrix.configuration }}\net8.0-windows\*\ILSpy.ReadyToRun.Plugin.resources.dll + run: 7z a -tzip $env:StagingDirectory\ILSpy_binaries.zip .\ILSpy\bin\${{ matrix.configuration }}\net10.0-windows\*.dll .\ILSpy\bin\${{ matrix.configuration }}\net10.0-windows\*.exe .\ILSpy\bin\${{ matrix.configuration }}\net10.0-windows\*.config .\ILSpy\bin\${{ matrix.configuration }}\net10.0-windows\*.json .\ILSpy\bin\${{ matrix.configuration }}\net10.0-windows\*\ILSpy.resources.dll .\ILSpy\bin\${{ matrix.configuration }}\net10.0-windows\*\ILSpy.ReadyToRun.Plugin.resources.dll - name: Publish x64/arm64 framework-dependent/self-contained shell: pwsh @@ -102,11 +102,11 @@ jobs: - name: Zip ILSpy Release (x64 self-contained) if: matrix.configuration == 'release' - run: 7z a -tzip $env:StagingDirectory\ILSpy_selfcontained_x64.zip .\ILSpy\bin\Release\net8.0-windows\win-x64\publish\selfcontained\* + run: 7z a -tzip $env:StagingDirectory\ILSpy_selfcontained_x64.zip .\ILSpy\bin\Release\net10.0-windows\win-x64\publish\selfcontained\* - name: Zip ILSpy Release (arm64 framework-dependent) if: matrix.configuration == 'release' - run: 7z a -tzip $env:StagingDirectory\ILSpy_binaries_arm64.zip .\ILSpy\bin\Release\net8.0-windows\win-arm64\publish\fwdependent\* + run: 7z a -tzip $env:StagingDirectory\ILSpy_binaries_arm64.zip .\ILSpy\bin\Release\net10.0-windows\win-arm64\publish\fwdependent\* - name: Pack NuGets if: matrix.configuration == 'release' diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 1508ed57f..64593341d 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -37,8 +37,8 @@ jobs: - uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.0.x' - dotnet-quality: 'ga' + dotnet-version: '10.0.x' + dotnet-quality: 'preview' - name: Build run: dotnet build ILSpy.XPlat.slnf --configuration Release diff --git a/BuildTools/pre-commit b/BuildTools/pre-commit index 1067d5581..8d455651a 100644 --- a/BuildTools/pre-commit +++ b/BuildTools/pre-commit @@ -5,11 +5,11 @@ set -eu -DOTNET_FORMAT_VERSION=8.3.546805 +DOTNET_FORMAT_VERSION=9.0.520307 DOTNET_PATH="$LOCALAPPDATA/ICSharpCode/ILSpy/dotnet-format-$DOTNET_FORMAT_VERSION" if [ ! -d "$DOTNET_PATH" ]; then echo "Downloading dotnet-format $DOTNET_FORMAT_VERSION..." - dotnet tool install --tool-path "$DOTNET_PATH" dotnet-format --version "$DOTNET_FORMAT_VERSION" --add-source "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json" + dotnet tool install --tool-path "$DOTNET_PATH" dotnet-format --version "$DOTNET_FORMAT_VERSION" --add-source "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json" fi "$DOTNET_PATH/dotnet-format.exe" --version diff --git a/ICSharpCode.BamlDecompiler/ICSharpCode.BamlDecompiler.csproj b/ICSharpCode.BamlDecompiler/ICSharpCode.BamlDecompiler.csproj index 5bee31b6c..b85274aca 100644 --- a/ICSharpCode.BamlDecompiler/ICSharpCode.BamlDecompiler.csproj +++ b/ICSharpCode.BamlDecompiler/ICSharpCode.BamlDecompiler.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 True ..\ICSharpCode.Decompiler\ICSharpCode.Decompiler.snk @@ -14,7 +14,7 @@ ICSharpCode.BamlDecompiler - 8.0.0.0-noversion + 10.0.0.0-noversion ILSpy BAML Decompiler ILSpy Contributors MIT @@ -44,7 +44,7 @@ true - true + true diff --git a/ICSharpCode.BamlDecompiler/packages.lock.json b/ICSharpCode.BamlDecompiler/packages.lock.json index 06e809065..479c3b8d2 100644 --- a/ICSharpCode.BamlDecompiler/packages.lock.json +++ b/ICSharpCode.BamlDecompiler/packages.lock.json @@ -1,7 +1,7 @@ { "version": 2, "dependencies": { - "net8.0": { + "net10.0": { "Microsoft.Sbom.Targets": { "type": "Direct", "requested": "[3.1.0, )", diff --git a/ICSharpCode.Decompiler.TestRunner/ICSharpCode.Decompiler.TestRunner.csproj b/ICSharpCode.Decompiler.TestRunner/ICSharpCode.Decompiler.TestRunner.csproj index af31fefa2..f9929d13f 100644 --- a/ICSharpCode.Decompiler.TestRunner/ICSharpCode.Decompiler.TestRunner.csproj +++ b/ICSharpCode.Decompiler.TestRunner/ICSharpCode.Decompiler.TestRunner.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net10.0 enable diff --git a/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs b/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs index 4583a5fae..d1c00d9cc 100644 --- a/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs +++ b/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs @@ -105,9 +105,9 @@ namespace ICSharpCode.Decompiler.Tests.Helpers TesterPath = Path.GetDirectoryName(typeof(Tester).Assembly.Location); TestCasePath = Path.Combine(TesterPath, "../../../../TestCases"); #if DEBUG - testRunnerBasePath = Path.Combine(TesterPath, "../../../../../ICSharpCode.Decompiler.TestRunner/bin/Debug/net8.0"); + testRunnerBasePath = Path.Combine(TesterPath, "../../../../../ICSharpCode.Decompiler.TestRunner/bin/Debug/net10.0"); #else - testRunnerBasePath = Path.Combine(TesterPath, "../../../../../ICSharpCode.Decompiler.TestRunner/bin/Release/net8.0"); + testRunnerBasePath = Path.Combine(TesterPath, "../../../../../ICSharpCode.Decompiler.TestRunner/bin/Release/net10.0"); #endif // To parse: packagesPropsFile = Path.Combine(TesterPath, "../../../../../Directory.Packages.props"); @@ -277,8 +277,8 @@ namespace ICSharpCode.Decompiler.Tests.Helpers } static readonly string coreRefAsmPath = new DotNetCorePathFinder(TargetFrameworkIdentifier.NET, - new Version(8, 0), "Microsoft.NETCore.App") - .GetReferenceAssemblyPath(".NETCoreApp,Version=v8.0"); + new Version(10, 0), "Microsoft.NETCore.App") + .GetReferenceAssemblyPath(".NETCoreApp,Version=v10.0"); public static readonly string RefAsmPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), @"Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2"); @@ -316,7 +316,7 @@ namespace ICSharpCode.Decompiler.Tests.Helpers const string targetFrameworkAttributeSnippet = @" -[assembly: System.Runtime.Versioning.TargetFramework("".NETCoreApp,Version=v8.0"", FrameworkDisplayName = """")] +[assembly: System.Runtime.Versioning.TargetFramework("".NETCoreApp,Version=v10.0"", FrameworkDisplayName = """")] "; diff --git a/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj b/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj index 110b3bb36..72c4aaaa7 100644 --- a/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj +++ b/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj @@ -7,7 +7,7 @@ - net8.0-windows + net10.0-windows win-x64 win-arm64 diff --git a/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj b/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj index 7e2e19341..53daacdc6 100644 --- a/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj +++ b/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj @@ -51,7 +51,7 @@ true - true + true diff --git a/ICSharpCode.Decompiler/Properties/DecompilerVersionInfo.template.cs b/ICSharpCode.Decompiler/Properties/DecompilerVersionInfo.template.cs index f4a587815..cc4e60030 100644 --- a/ICSharpCode.Decompiler/Properties/DecompilerVersionInfo.template.cs +++ b/ICSharpCode.Decompiler/Properties/DecompilerVersionInfo.template.cs @@ -1,10 +1,10 @@ public static class DecompilerVersionInfo { - public const string Major = "9"; - public const string Minor = "1"; + public const string Major = "10"; + public const string Minor = "0"; public const string Build = "0"; public const string Revision = "$INSERTREVISION$"; - public const string VersionName = null; + public const string VersionName = "preview1"; public const string FullVersion = Major + "." + Minor + "." + Build + ".$INSERTREVISION$$INSERTBRANCHPOSTFIX$$INSERTVERSIONNAMEPOSTFIX$"; public const string FullVersionWithShortCommitHash = FullVersion + "+$INSERTSHORTCOMMITHASH$"; diff --git a/ICSharpCode.ILSpyCmd/ICSharpCode.ILSpyCmd.csproj b/ICSharpCode.ILSpyCmd/ICSharpCode.ILSpyCmd.csproj index aba229ad0..528650279 100644 --- a/ICSharpCode.ILSpyCmd/ICSharpCode.ILSpyCmd.csproj +++ b/ICSharpCode.ILSpyCmd/ICSharpCode.ILSpyCmd.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net10.0 true true true @@ -35,7 +35,7 @@ true - true + true diff --git a/ICSharpCode.ILSpyCmd/packages.lock.json b/ICSharpCode.ILSpyCmd/packages.lock.json index 891f86671..5b63ee7c5 100644 --- a/ICSharpCode.ILSpyCmd/packages.lock.json +++ b/ICSharpCode.ILSpyCmd/packages.lock.json @@ -1,7 +1,7 @@ { "version": 2, "dependencies": { - "net8.0": { + "net10.0": { "McMaster.Extensions.Hosting.CommandLine": { "type": "Direct", "requested": "[4.1.1, )", diff --git a/ICSharpCode.ILSpyX/ICSharpCode.ILSpyX.csproj b/ICSharpCode.ILSpyX/ICSharpCode.ILSpyX.csproj index 3bcd8c8e1..b0e9423b5 100644 --- a/ICSharpCode.ILSpyX/ICSharpCode.ILSpyX.csproj +++ b/ICSharpCode.ILSpyX/ICSharpCode.ILSpyX.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 enable true nullable @@ -51,7 +51,7 @@ true - true + true diff --git a/ICSharpCode.ILSpyX/packages.lock.json b/ICSharpCode.ILSpyX/packages.lock.json index aac3060dd..08db0ba75 100644 --- a/ICSharpCode.ILSpyX/packages.lock.json +++ b/ICSharpCode.ILSpyX/packages.lock.json @@ -1,7 +1,7 @@ { "version": 2, "dependencies": { - "net8.0": { + "net10.0": { "K4os.Compression.LZ4": { "type": "Direct", "requested": "[1.3.8, )", diff --git a/ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj b/ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj index 849406f39..3c758f5ae 100644 --- a/ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj +++ b/ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj @@ -7,7 +7,7 @@ - net8.0-windows + net10.0-windows win-x64 win-arm64 diff --git a/ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj b/ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj index 63950dda4..46c5cab87 100644 --- a/ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj +++ b/ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj @@ -2,7 +2,7 @@ ILSpy.BamlDecompiler.Plugin - net8.0-windows + net10.0-windows win-x64;win-arm64 false False diff --git a/ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj b/ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj index dfe925ddd..f60326eb0 100644 --- a/ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj +++ b/ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj @@ -3,7 +3,7 @@ ILSpy.ReadyToRun.Plugin - net8.0-windows + net10.0-windows win-x64;win-arm64 False en-US diff --git a/ILSpy.Tests/ILSpy.Tests.csproj b/ILSpy.Tests/ILSpy.Tests.csproj index 7fff3f2eb..5c361e11c 100644 --- a/ILSpy.Tests/ILSpy.Tests.csproj +++ b/ILSpy.Tests/ILSpy.Tests.csproj @@ -2,7 +2,7 @@ - net8.0-windows + net10.0-windows false AutoGeneratedProgram diff --git a/ILSpy.sln b/ILSpy.sln index 099c49504..27a5a1fd6 100644 --- a/ILSpy.sln +++ b/ILSpy.sln @@ -41,6 +41,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution .editorconfig = .editorconfig Directory.Build.props = Directory.Build.props Directory.Packages.props = Directory.Packages.props + global.json = global.json EndProjectSection EndProject Global diff --git a/ILSpy/ILSpy.csproj b/ILSpy/ILSpy.csproj index aa5a7264a..3896678ed 100644 --- a/ILSpy/ILSpy.csproj +++ b/ILSpy/ILSpy.csproj @@ -2,7 +2,7 @@ WinExe - net8.0-windows + net10.0-windows major win-x64;win-arm64 False diff --git a/TestPlugin/TestPlugin.csproj b/TestPlugin/TestPlugin.csproj index c527fbcae..dbfb5f9d5 100644 --- a/TestPlugin/TestPlugin.csproj +++ b/TestPlugin/TestPlugin.csproj @@ -1,7 +1,7 @@  - net8.0-windows + net10.0-windows Test.Plugin true true diff --git a/global.json b/global.json index 6a5d4badd..42b44a1ed 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.100", + "version": "10.0.0", "rollForward": "major", "allowPrerelease": true }