From 3dc2c118ff986fe720094e8f002f5e331ef717d5 Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Fri, 27 Mar 2026 16:06:02 +0100 Subject: [PATCH 01/18] .NET 11 RC2 minimal changes --- .github/workflows/build-frontends.yml | 2 +- .github/workflows/build-ilspy.yml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- .../ICSharpCode.Decompiler.TestRunner.csproj | 2 +- ICSharpCode.Decompiler.Tests/Helpers/Tester.cs | 15 +++++++++------ global.json | 2 +- 6 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-frontends.yml b/.github/workflows/build-frontends.yml index 52200d2c8..901673e6e 100644 --- a/.github/workflows/build-frontends.yml +++ b/.github/workflows/build-frontends.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/setup-dotnet@v5 with: - dotnet-version: '10.0.x' + dotnet-version: '11.0.x' dotnet-quality: 'preview' - name: Install dependencies diff --git a/.github/workflows/build-ilspy.yml b/.github/workflows/build-ilspy.yml index 238b6ddfa..6ac450b45 100644 --- a/.github/workflows/build-ilspy.yml +++ b/.github/workflows/build-ilspy.yml @@ -34,7 +34,7 @@ jobs: - uses: actions/setup-dotnet@v5 with: - dotnet-version: '10.0.x' + dotnet-version: '11.0.x' dotnet-quality: 'preview' env: DOTNET_INSTALL_DIR: ${{ runner.temp }}/.dotnet diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f6b23317f..31aa67975 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -37,7 +37,7 @@ jobs: - uses: actions/setup-dotnet@v5 with: - dotnet-version: '10.0.x' + dotnet-version: '11.0.x' dotnet-quality: 'preview' - name: Build diff --git a/ICSharpCode.Decompiler.TestRunner/ICSharpCode.Decompiler.TestRunner.csproj b/ICSharpCode.Decompiler.TestRunner/ICSharpCode.Decompiler.TestRunner.csproj index f9929d13f..795cebecf 100644 --- a/ICSharpCode.Decompiler.TestRunner/ICSharpCode.Decompiler.TestRunner.csproj +++ b/ICSharpCode.Decompiler.TestRunner/ICSharpCode.Decompiler.TestRunner.csproj @@ -2,7 +2,7 @@ Exe - net10.0 + net11.0 enable diff --git a/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs b/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs index 9114a3b6f..70b0169fc 100644 --- a/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs +++ b/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs @@ -108,9 +108,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/net10.0"); + testRunnerBasePath = Path.Combine(TesterPath, "../../../../../ICSharpCode.Decompiler.TestRunner/bin/Debug/net11.0"); #else - testRunnerBasePath = Path.Combine(TesterPath, "../../../../../ICSharpCode.Decompiler.TestRunner/bin/Release/net10.0"); + testRunnerBasePath = Path.Combine(TesterPath, "../../../../../ICSharpCode.Decompiler.TestRunner/bin/Release/net11.0"); #endif // To parse: packagesPropsFile = Path.Combine(TesterPath, "../../../../../Directory.Packages.props"); @@ -135,7 +135,7 @@ namespace ICSharpCode.Decompiler.Tests.Helpers await vswhereToolset.Fetch().ConfigureAwait(false); await RefAssembliesToolset.Fetch("5.0.0", sourcePath: "ref/net5.0").ConfigureAwait(false); - await RefAssembliesToolset.Fetch("10.0.0-rc.2.25502.107", sourcePath: "ref/net10.0").ConfigureAwait(false); + await RefAssembliesToolset.Fetch("11.0.0-preview.2.26159.112", sourcePath: "ref/net11.0").ConfigureAwait(false); #if DEBUG await BuildTestRunner("win-x86", "Debug").ConfigureAwait(false); @@ -341,7 +341,7 @@ namespace ICSharpCode.Decompiler.Tests.Helpers }; static readonly Dictionary> targetFrameworkAttributeSnippetFiles = new() { - { ".NETCoreApp,Version=v10.0", new Lazy(() => GetTargetFrameworkAttributeSnippetFile(".NETCoreApp,Version=v10.0")) }, + { ".NETCoreApp,Version=v11.0", new Lazy(() => GetTargetFrameworkAttributeSnippetFile(".NETCoreApp,Version=v11.0")) }, { ".NETCoreApp,Version=v5.0", new Lazy(() => GetTargetFrameworkAttributeSnippetFile(".NETCoreApp,Version=v5.0")) }, { ".NETCoreApp,Version=v2.2", new Lazy(() => GetTargetFrameworkAttributeSnippetFile(".NETCoreApp,Version=v2.2")) }, }; @@ -454,12 +454,15 @@ namespace System.Runtime.CompilerServices preprocessorSymbols.Add("NET80"); preprocessorSymbols.Add("NET90"); preprocessorSymbols.Add("NET100"); + preprocessorSymbols.Add("NET110"); } preprocessorSymbols.Add("ROSLYN4"); preprocessorSymbols.Add("CS100"); preprocessorSymbols.Add("CS110"); preprocessorSymbols.Add("CS120"); preprocessorSymbols.Add("CS130"); + preprocessorSymbols.Add("CS140"); + preprocessorSymbols.Add("CS150"); } } else if ((flags & CompilerOptions.UseMcsMask) != 0) @@ -520,7 +523,7 @@ namespace System.Runtime.CompilerServices CompilerOptions.UseRoslyn1_3_2 => ("1.3.2", "6", null), CompilerOptions.UseRoslyn2_10_0 => ("2.10.0", "latest", targetNet40 ? null : ".NETCoreApp,Version=v2.2"), CompilerOptions.UseRoslyn3_11_0 => ("3.11.0", "latest", targetNet40 ? null : ".NETCoreApp,Version=v5.0"), - _ => (roslynLatestVersion, flags.HasFlag(CompilerOptions.Preview) ? "preview" : "latest", targetNet40 ? null : ".NETCoreApp,Version=v10.0") + _ => (roslynLatestVersion, flags.HasFlag(CompilerOptions.Preview) ? "preview" : "latest", targetNet40 ? null : ".NETCoreApp,Version=v11.0") }; var cscPath = roslynToolset.GetCSharpCompiler(roslynVersion); @@ -770,7 +773,7 @@ namespace System.Runtime.CompilerServices } var compilation = CSharpCompilation.Create(Path.GetFileNameWithoutExtension(assemblyName), - syntaxTrees, coreDefaultReferences.Select(r => MetadataReference.CreateFromFile(Path.Combine(RefAssembliesToolset.GetPath(".NETCoreApp,Version=v10.0"), r))), + syntaxTrees, coreDefaultReferences.Select(r => MetadataReference.CreateFromFile(Path.Combine(RefAssembliesToolset.GetPath(".NETCoreApp,Version=v11.0"), r))), new CSharpCompilationOptions( OutputKind.DynamicallyLinkedLibrary, platform: Platform.AnyCpu, diff --git a/global.json b/global.json index 91af2aeac..115ca7301 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "10.0.0", + "version": "11.0.0", "rollForward": "major", "allowPrerelease": true }, From 554157fc016088132ef4f8524e1a05c90a870e16 Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Fri, 27 Mar 2026 16:19:48 +0100 Subject: [PATCH 02/18] Switch out msbuild --- .github/workflows/build-ilspy.yml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-ilspy.yml b/.github/workflows/build-ilspy.yml index 6ac450b45..a9286804d 100644 --- a/.github/workflows/build-ilspy.yml +++ b/.github/workflows/build-ilspy.yml @@ -40,9 +40,6 @@ jobs: DOTNET_INSTALL_DIR: ${{ runner.temp }}/.dotnet DOTNET_ROOT: ${{ runner.temp }}/.dotnet - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v3 - - name: Install dotnet-format env: DOTNET_FORMAT_VERSION: 10.0.100-rtm.25531.102 @@ -63,10 +60,10 @@ jobs: Get-ChildItem Env: | Where-Object {$_.Name -Match "^ILSPY_"} | %{ echo "$($_.Name)=$($_.Value)" } | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append - name: Restore the application - run: msbuild ILSpy.sln /t:Restore /p:RestoreEnablePackagePruning=false /p:Configuration=${{ matrix.configuration }} /p:Platform=$env:BuildPlatform + run: dotnet restore ILSpy.sln /p:RestoreEnablePackagePruning=false /p:Configuration=${{ matrix.configuration }} /p:Platform="$env:BuildPlatform" - name: Build - run: msbuild ILSpy.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=$env:BuildPlatform /m + run: dotnet build ILSpy.sln --no-restore -c ${{ matrix.configuration }} /p:Platform="$env:BuildPlatform" /m - name: Format check run: dotnet-format whitespace --verify-no-changes --verbosity detailed ILSpy.sln @@ -120,15 +117,15 @@ jobs: - name: Build Installer (x64 and arm64, framework-dependent) if: matrix.configuration == 'release' run: | - msbuild ILSpy.Installer.sln /t:Restore /p:Configuration="Release" /p:Platform="Any CPU" - msbuild ILSpy.Installer.sln /p:Configuration="Release" /p:Platform="Any CPU" - msbuild ILSpy.Installer.sln /p:Configuration="Release" /p:Platform="Any CPU" /p:PlatformForInstaller="ARM64" + dotnet msbuild ILSpy.Installer.sln /t:Restore /p:Configuration="Release" /p:Platform="Any CPU" + dotnet msbuild ILSpy.Installer.sln /p:Configuration="Release" /p:Platform="Any CPU" + dotnet msbuild ILSpy.Installer.sln /p:Configuration="Release" /p:Platform="Any CPU" /p:PlatformForInstaller="ARM64" - name: Build VS Extensions (for 2017-2019 and 2022) if: matrix.configuration == 'release' run: | - msbuild ILSpy.VSExtensions.sln /t:Restore /p:Configuration="Release" /p:Platform="Any CPU" - msbuild ILSpy.VSExtensions.sln /p:Configuration="Release" /p:Platform="Any CPU" + dotnet msbuild ILSpy.VSExtensions.sln /t:Restore /p:Configuration="Release" /p:Platform="Any CPU" + dotnet msbuild ILSpy.VSExtensions.sln /p:Configuration="Release" /p:Platform="Any CPU" # https://github.com/actions/upload-artifact - name: Upload VSIX (VS 2019) release build artifacts From 6d3966e7725669c1a0af436514e4879466861628 Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Fri, 27 Mar 2026 16:50:31 +0100 Subject: [PATCH 03/18] Heuristic for transport feed Roslyn selection (VSIX build will now fail) --- Directory.Packages.props | 4 +-- .../Helpers/RoslynToolset.cs | 36 ++++++++++++++++--- ILSpy.sln | 6 ++-- NuGet.config | 3 +- 4 files changed, 39 insertions(+), 10 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 8fb2876ba..7bc503f1b 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -15,8 +15,8 @@ - - + + diff --git a/ICSharpCode.Decompiler.Tests/Helpers/RoslynToolset.cs b/ICSharpCode.Decompiler.Tests/Helpers/RoslynToolset.cs index 0cf476717..b7b98b11a 100644 --- a/ICSharpCode.Decompiler.Tests/Helpers/RoslynToolset.cs +++ b/ICSharpCode.Decompiler.Tests/Helpers/RoslynToolset.cs @@ -41,8 +41,8 @@ namespace ICSharpCode.Decompiler.Tests.Helpers abstract class AbstractToolset { readonly SourceCacheContext cache; - readonly SourceRepository repository; - readonly FindPackageByIdResource resource; + readonly SourceRepository repository, transportFeedRepository; + readonly FindPackageByIdResource resource, transportFeedResource; protected readonly string baseDir; public AbstractToolset(string baseDir) @@ -50,9 +50,31 @@ namespace ICSharpCode.Decompiler.Tests.Helpers this.cache = new SourceCacheContext(); this.repository = Repository.Factory.GetCoreV3("https://api.nuget.org/v3/index.json"); this.resource = repository.GetResource(); + this.transportFeedRepository = Repository.Factory.GetCoreV3("https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json"); + this.transportFeedResource = transportFeedRepository.GetResource(); this.baseDir = baseDir; } + enum PackageVersionKind + { + Rtm, + Preview, + TransportFeed, + } + + // RTM versions look like 5.3.0, and preview ones like 4.12.0-3.final. Transport feed ones eg 5.6.0-2.26177.1 + static PackageVersionKind ClassifyVersion(NuGetVersion version) + { + if (!version.IsPrerelease) + return PackageVersionKind.Rtm; + + var labels = version.ReleaseLabels.ToList(); + bool looksLikeTransportFeed = labels.Count >= 3 + && labels.All(static label => int.TryParse(label, out _)); + + return looksLikeTransportFeed ? PackageVersionKind.TransportFeed : PackageVersionKind.Preview; + } + protected async Task FetchPackage(string packageName, string version, string sourcePath, string outputPath) { if (!Directory.Exists(Path.Combine(Roundtrip.RoundtripAssembly.TestDir, "nuget"))) @@ -70,9 +92,15 @@ namespace ICSharpCode.Decompiler.Tests.Helpers { packageStream = new MemoryStream(); - await resource.CopyNupkgToStreamAsync( + NuGetVersion parsedVersion = NuGetVersion.Parse(version); + PackageVersionKind versionKind = ClassifyVersion(parsedVersion); + FindPackageByIdResource selectedResource = versionKind == PackageVersionKind.TransportFeed + ? transportFeedResource + : resource; + + await selectedResource.CopyNupkgToStreamAsync( packageName, - NuGetVersion.Parse(version), + parsedVersion, packageStream, cache, logger, diff --git a/ILSpy.sln b/ILSpy.sln index dd9dfdd8e..cc84420d0 100644 --- a/ILSpy.sln +++ b/ILSpy.sln @@ -1,7 +1,6 @@ - Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.32014.148 +# Visual Studio Version 18 +VisualStudioVersion = 18.4.11620.152 stable MinimumVisualStudioVersion = 15.0 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "doc", "doc", "{F45DB999-7E72-4000-B5AD-3A7B485A0896}" ProjectSection(SolutionItems) = preProject @@ -42,6 +41,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Directory.Build.props = Directory.Build.props Directory.Packages.props = Directory.Packages.props global.json = global.json + NuGet.config = NuGet.config EndProjectSection EndProject Global diff --git a/NuGet.config b/NuGet.config index c7d27132e..495cef552 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,8 +4,8 @@ - + @@ -19,6 +19,7 @@ + From db6c4c674e835e0ab6263e17cc30840dd456fc36 Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Fri, 27 Mar 2026 16:53:16 +0100 Subject: [PATCH 04/18] Microsoft.CodeAnalysis.NetAnalyzers from main NuGet feed --- NuGet.config | 1 + 1 file changed, 1 insertion(+) diff --git a/NuGet.config b/NuGet.config index 495cef552..63c7aff7b 100644 --- a/NuGet.config +++ b/NuGet.config @@ -12,6 +12,7 @@ + From 3606fe289136232952cf17f7d2a8a0c0b794b82e Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Fri, 27 Mar 2026 17:47:27 +0100 Subject: [PATCH 05/18] Disable VSIX builds --- .github/workflows/build-ilspy.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-ilspy.yml b/.github/workflows/build-ilspy.yml index a9286804d..d44a467dc 100644 --- a/.github/workflows/build-ilspy.yml +++ b/.github/workflows/build-ilspy.yml @@ -20,7 +20,8 @@ jobs: Configuration: [ Debug, Release ] env: BuildPlatform: Any CPU - StagingDirectory: buildartifacts + StagingDirectory: buildartifacts + BuildAndPublishVsix: false # temp disable due to usage of transport feed for net11 steps: - run: mkdir -p $env:StagingDirectory @@ -122,14 +123,14 @@ jobs: dotnet msbuild ILSpy.Installer.sln /p:Configuration="Release" /p:Platform="Any CPU" /p:PlatformForInstaller="ARM64" - name: Build VS Extensions (for 2017-2019 and 2022) - if: matrix.configuration == 'release' + if: matrix.configuration == 'release' && env.BuildAndPublishVsix == 'true' run: | dotnet msbuild ILSpy.VSExtensions.sln /t:Restore /p:Configuration="Release" /p:Platform="Any CPU" dotnet msbuild ILSpy.VSExtensions.sln /p:Configuration="Release" /p:Platform="Any CPU" # https://github.com/actions/upload-artifact - name: Upload VSIX (VS 2019) release build artifacts - if: matrix.configuration == 'release' + if: matrix.configuration == 'release' && env.BuildAndPublishVsix == 'true' uses: actions/upload-artifact@v7 with: name: ILSpy VS Addin for VS 2017-2019 ${{ steps.version.outputs.ILSPY_VERSION_NUMBER }} (${{ matrix.configuration }}) @@ -137,7 +138,7 @@ jobs: if-no-files-found: error - name: Upload VSIX (VS 2022) release build artifacts - if: matrix.configuration == 'release' + if: matrix.configuration == 'release' && env.BuildAndPublishVsix == 'true' uses: actions/upload-artifact@v7 with: name: ILSpy VS Addin for VS 2022 ${{ steps.version.outputs.ILSPY_VERSION_NUMBER }} (${{ matrix.configuration }}) From 6f1c004552cb79f5deca1c6f16277a0d72f60a40 Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Fri, 27 Mar 2026 17:53:33 +0100 Subject: [PATCH 06/18] Go for the VS2026 image, bring back setup-msbuild --- .github/workflows/build-ilspy.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-ilspy.yml b/.github/workflows/build-ilspy.yml index d44a467dc..52e479a61 100644 --- a/.github/workflows/build-ilspy.yml +++ b/.github/workflows/build-ilspy.yml @@ -13,7 +13,7 @@ jobs: Build: permissions: packages: write # for dotnet nuget push - runs-on: windows-2025 + runs-on: windows-2025-vs2026 strategy: fail-fast: false matrix: @@ -41,6 +41,9 @@ jobs: DOTNET_INSTALL_DIR: ${{ runner.temp }}/.dotnet DOTNET_ROOT: ${{ runner.temp }}/.dotnet + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v3 + - name: Install dotnet-format env: DOTNET_FORMAT_VERSION: 10.0.100-rtm.25531.102 From 677293c32bb6f6c0a3741bc5e9c6f97da4650afd Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Fri, 27 Mar 2026 18:13:50 +0100 Subject: [PATCH 07/18] RefAssembliesToolset.Fetch 10 as well (might not be necessary when switching all test projects to net11) --- ICSharpCode.Decompiler.Tests/Helpers/Tester.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs b/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs index 70b0169fc..c6ecf6d77 100644 --- a/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs +++ b/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs @@ -135,6 +135,7 @@ namespace ICSharpCode.Decompiler.Tests.Helpers await vswhereToolset.Fetch().ConfigureAwait(false); await RefAssembliesToolset.Fetch("5.0.0", sourcePath: "ref/net5.0").ConfigureAwait(false); + await RefAssembliesToolset.Fetch("10.0.0", sourcePath: "ref/net10.0").ConfigureAwait(false); await RefAssembliesToolset.Fetch("11.0.0-preview.2.26159.112", sourcePath: "ref/net11.0").ConfigureAwait(false); #if DEBUG From 3bb31bb2719a558fa24b0c1d97c6bb1c83f9792e Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Fri, 27 Mar 2026 18:31:58 +0100 Subject: [PATCH 08/18] Install 10 as well --- .github/workflows/build-ilspy.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build-ilspy.yml b/.github/workflows/build-ilspy.yml index 52e479a61..49c2097fe 100644 --- a/.github/workflows/build-ilspy.yml +++ b/.github/workflows/build-ilspy.yml @@ -33,6 +33,10 @@ jobs: fetch-depth: 0 persist-credentials: false + - uses: actions/setup-dotnet@v5 + with: + dotnet-version: '10.0.x' + - uses: actions/setup-dotnet@v5 with: dotnet-version: '11.0.x' From 40f44896d21bbab89b807e007b05d63c832b1975 Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Fri, 27 Mar 2026 18:56:35 +0100 Subject: [PATCH 09/18] Switch all test projects to net11 (yes, ref asm v10 is needed even when switching to net11) --- .../ICSharpCode.Decompiler.Tests.csproj | 2 +- ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj | 2 +- ILSpy.Tests/ILSpy.Tests.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj b/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj index c34847739..8d1d26f7d 100644 --- a/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj +++ b/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj @@ -7,7 +7,7 @@ - net10.0-windows + net11.0-windows preview win-x64 win-arm64 diff --git a/ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj b/ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj index 59275ab45..b966a2f49 100644 --- a/ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj +++ b/ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj @@ -7,7 +7,7 @@ - net10.0-windows + net11.0-windows win-x64 win-arm64 diff --git a/ILSpy.Tests/ILSpy.Tests.csproj b/ILSpy.Tests/ILSpy.Tests.csproj index 05382fc29..0e3b2d737 100644 --- a/ILSpy.Tests/ILSpy.Tests.csproj +++ b/ILSpy.Tests/ILSpy.Tests.csproj @@ -7,7 +7,7 @@ - net10.0-windows + net11.0-windows false win-x64 win-arm64 From c4dec13ed625a3b59991fc143ac7c6ddfdf8122d Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Fri, 27 Mar 2026 19:07:22 +0100 Subject: [PATCH 10/18] Remove .NET 10 from pipeline again --- .github/workflows/build-ilspy.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/build-ilspy.yml b/.github/workflows/build-ilspy.yml index 49c2097fe..52e479a61 100644 --- a/.github/workflows/build-ilspy.yml +++ b/.github/workflows/build-ilspy.yml @@ -33,10 +33,6 @@ jobs: fetch-depth: 0 persist-credentials: false - - uses: actions/setup-dotnet@v5 - with: - dotnet-version: '10.0.x' - - uses: actions/setup-dotnet@v5 with: dotnet-version: '11.0.x' From 6ab2e2b60ed5d7e4d29364e8193b52928b908246 Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Fri, 27 Mar 2026 19:55:20 +0100 Subject: [PATCH 11/18] Extract constants --- .../Helpers/Tester.VB.cs | 2 +- ICSharpCode.Decompiler.Tests/Helpers/Tester.cs | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/ICSharpCode.Decompiler.Tests/Helpers/Tester.VB.cs b/ICSharpCode.Decompiler.Tests/Helpers/Tester.VB.cs index 98ceeb38e..73801bdfc 100644 --- a/ICSharpCode.Decompiler.Tests/Helpers/Tester.VB.cs +++ b/ICSharpCode.Decompiler.Tests/Helpers/Tester.VB.cs @@ -53,7 +53,7 @@ namespace ICSharpCode.Decompiler.Tests.Helpers CompilerOptions.UseRoslyn1_3_2 => ("1.3.2", "14", null), CompilerOptions.UseRoslyn2_10_0 => ("2.10.0", "latest", targetNet40 ? null : ".NETCoreApp,Version=v2.2"), CompilerOptions.UseRoslyn3_11_0 => ("3.11.0", "latest", targetNet40 ? null : ".NETCoreApp,Version=v5.0"), - _ => (roslynLatestVersion, flags.HasFlag(CompilerOptions.Preview) ? "preview" : "latest", targetNet40 ? null : ".NETCoreApp,Version=v10.0") + _ => (roslynLatestVersion, flags.HasFlag(CompilerOptions.Preview) ? "preview" : "latest", targetNet40 ? null : CurrentNetCoreAppVersion) }; var vbcPath = roslynToolset.GetVBCompiler(roslynVersion); diff --git a/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs b/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs index c6ecf6d77..3ca363880 100644 --- a/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs +++ b/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs @@ -93,6 +93,10 @@ namespace ICSharpCode.Decompiler.Tests.Helpers public static partial class Tester { + public const string CurrentNetCoreVersion = "11.0"; + public const string CurrentNetCoreAppVersion = ".NETCoreApp,Version=v11.0"; + public const string CurrentNetCoreRefAsmVersion = "11.0.0-preview.2.26159.112"; + public static readonly string TesterPath; public static readonly string TestCasePath; @@ -108,9 +112,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/net11.0"); + testRunnerBasePath = Path.Combine(TesterPath, $"../../../../../ICSharpCode.Decompiler.TestRunner/bin/Debug/net{CurrentNetCoreVersion}"); #else - testRunnerBasePath = Path.Combine(TesterPath, "../../../../../ICSharpCode.Decompiler.TestRunner/bin/Release/net11.0"); + testRunnerBasePath = Path.Combine(TesterPath, $"../../../../../ICSharpCode.Decompiler.TestRunner/bin/Release/net{CurrentNetCoreVersion}); #endif // To parse: packagesPropsFile = Path.Combine(TesterPath, "../../../../../Directory.Packages.props"); @@ -136,7 +140,7 @@ namespace ICSharpCode.Decompiler.Tests.Helpers await vswhereToolset.Fetch().ConfigureAwait(false); await RefAssembliesToolset.Fetch("5.0.0", sourcePath: "ref/net5.0").ConfigureAwait(false); await RefAssembliesToolset.Fetch("10.0.0", sourcePath: "ref/net10.0").ConfigureAwait(false); - await RefAssembliesToolset.Fetch("11.0.0-preview.2.26159.112", sourcePath: "ref/net11.0").ConfigureAwait(false); + await RefAssembliesToolset.Fetch(CurrentNetCoreRefAsmVersion, sourcePath: $"ref/net{CurrentNetCoreVersion}").ConfigureAwait(false); #if DEBUG await BuildTestRunner("win-x86", "Debug").ConfigureAwait(false); @@ -342,7 +346,7 @@ namespace ICSharpCode.Decompiler.Tests.Helpers }; static readonly Dictionary> targetFrameworkAttributeSnippetFiles = new() { - { ".NETCoreApp,Version=v11.0", new Lazy(() => GetTargetFrameworkAttributeSnippetFile(".NETCoreApp,Version=v11.0")) }, + { CurrentNetCoreAppVersion, new Lazy(() => GetTargetFrameworkAttributeSnippetFile(CurrentNetCoreAppVersion)) }, { ".NETCoreApp,Version=v5.0", new Lazy(() => GetTargetFrameworkAttributeSnippetFile(".NETCoreApp,Version=v5.0")) }, { ".NETCoreApp,Version=v2.2", new Lazy(() => GetTargetFrameworkAttributeSnippetFile(".NETCoreApp,Version=v2.2")) }, }; @@ -524,7 +528,7 @@ namespace System.Runtime.CompilerServices CompilerOptions.UseRoslyn1_3_2 => ("1.3.2", "6", null), CompilerOptions.UseRoslyn2_10_0 => ("2.10.0", "latest", targetNet40 ? null : ".NETCoreApp,Version=v2.2"), CompilerOptions.UseRoslyn3_11_0 => ("3.11.0", "latest", targetNet40 ? null : ".NETCoreApp,Version=v5.0"), - _ => (roslynLatestVersion, flags.HasFlag(CompilerOptions.Preview) ? "preview" : "latest", targetNet40 ? null : ".NETCoreApp,Version=v11.0") + _ => (roslynLatestVersion, flags.HasFlag(CompilerOptions.Preview) ? "preview" : "latest", targetNet40 ? null : CurrentNetCoreAppVersion) }; var cscPath = roslynToolset.GetCSharpCompiler(roslynVersion); @@ -774,7 +778,7 @@ namespace System.Runtime.CompilerServices } var compilation = CSharpCompilation.Create(Path.GetFileNameWithoutExtension(assemblyName), - syntaxTrees, coreDefaultReferences.Select(r => MetadataReference.CreateFromFile(Path.Combine(RefAssembliesToolset.GetPath(".NETCoreApp,Version=v11.0"), r))), + syntaxTrees, coreDefaultReferences.Select(r => MetadataReference.CreateFromFile(Path.Combine(RefAssembliesToolset.GetPath(CurrentNetCoreAppVersion), r))), new CSharpCompilationOptions( OutputKind.DynamicallyLinkedLibrary, platform: Platform.AnyCpu, From 8eedd5c6b68b47351d0b55a7a3207840df34a403 Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Fri, 27 Mar 2026 19:58:55 +0100 Subject: [PATCH 12/18] Again, caught by conditional code --- ICSharpCode.Decompiler.Tests/Helpers/Tester.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs b/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs index 3ca363880..b7e518589 100644 --- a/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs +++ b/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs @@ -114,7 +114,7 @@ namespace ICSharpCode.Decompiler.Tests.Helpers #if DEBUG testRunnerBasePath = Path.Combine(TesterPath, $"../../../../../ICSharpCode.Decompiler.TestRunner/bin/Debug/net{CurrentNetCoreVersion}"); #else - testRunnerBasePath = Path.Combine(TesterPath, $"../../../../../ICSharpCode.Decompiler.TestRunner/bin/Release/net{CurrentNetCoreVersion}); + testRunnerBasePath = Path.Combine(TesterPath, $"../../../../../ICSharpCode.Decompiler.TestRunner/bin/Release/net{CurrentNetCoreVersion}"); #endif // To parse: packagesPropsFile = Path.Combine(TesterPath, "../../../../../Directory.Packages.props"); From 4ca8fb1967271e3a89a7e6151e683e852ef3c53e Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Sat, 28 Mar 2026 07:33:01 +0100 Subject: [PATCH 13/18] Rename to match naming in nuget.config --- ICSharpCode.Decompiler.Tests/Helpers/RoslynToolset.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ICSharpCode.Decompiler.Tests/Helpers/RoslynToolset.cs b/ICSharpCode.Decompiler.Tests/Helpers/RoslynToolset.cs index b7b98b11a..5718fbbb1 100644 --- a/ICSharpCode.Decompiler.Tests/Helpers/RoslynToolset.cs +++ b/ICSharpCode.Decompiler.Tests/Helpers/RoslynToolset.cs @@ -41,8 +41,8 @@ namespace ICSharpCode.Decompiler.Tests.Helpers abstract class AbstractToolset { readonly SourceCacheContext cache; - readonly SourceRepository repository, transportFeedRepository; - readonly FindPackageByIdResource resource, transportFeedResource; + readonly SourceRepository repository, dotnetToolsFeed; + readonly FindPackageByIdResource resource, dotnetToolsResource; protected readonly string baseDir; public AbstractToolset(string baseDir) @@ -50,8 +50,8 @@ namespace ICSharpCode.Decompiler.Tests.Helpers this.cache = new SourceCacheContext(); this.repository = Repository.Factory.GetCoreV3("https://api.nuget.org/v3/index.json"); this.resource = repository.GetResource(); - this.transportFeedRepository = Repository.Factory.GetCoreV3("https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json"); - this.transportFeedResource = transportFeedRepository.GetResource(); + this.dotnetToolsFeed = Repository.Factory.GetCoreV3("https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json"); + this.dotnetToolsResource = dotnetToolsFeed.GetResource(); this.baseDir = baseDir; } @@ -95,7 +95,7 @@ namespace ICSharpCode.Decompiler.Tests.Helpers NuGetVersion parsedVersion = NuGetVersion.Parse(version); PackageVersionKind versionKind = ClassifyVersion(parsedVersion); FindPackageByIdResource selectedResource = versionKind == PackageVersionKind.TransportFeed - ? transportFeedResource + ? dotnetToolsResource : resource; await selectedResource.CopyNupkgToStreamAsync( From 2ae1ec6091b0d13aec8fbde3b14194c01ff8a3b5 Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Tue, 7 Apr 2026 07:47:13 +0200 Subject: [PATCH 14/18] Include vsix with plain nuget.config files --- .github/workflows/build-ilspy.yml | 2 +- ILSpy.AddIn.VS2022/NuGet.config | 7 +++++++ ILSpy.AddIn/NuGet.config | 7 +++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 ILSpy.AddIn.VS2022/NuGet.config create mode 100644 ILSpy.AddIn/NuGet.config diff --git a/.github/workflows/build-ilspy.yml b/.github/workflows/build-ilspy.yml index 52e479a61..dcbc92b64 100644 --- a/.github/workflows/build-ilspy.yml +++ b/.github/workflows/build-ilspy.yml @@ -21,7 +21,7 @@ jobs: env: BuildPlatform: Any CPU StagingDirectory: buildartifacts - BuildAndPublishVsix: false # temp disable due to usage of transport feed for net11 + BuildAndPublishVsix: true # temp disable due to usage of transport feed for net11 steps: - run: mkdir -p $env:StagingDirectory diff --git a/ILSpy.AddIn.VS2022/NuGet.config b/ILSpy.AddIn.VS2022/NuGet.config new file mode 100644 index 000000000..765346e53 --- /dev/null +++ b/ILSpy.AddIn.VS2022/NuGet.config @@ -0,0 +1,7 @@ + + + + + + + diff --git a/ILSpy.AddIn/NuGet.config b/ILSpy.AddIn/NuGet.config new file mode 100644 index 000000000..765346e53 --- /dev/null +++ b/ILSpy.AddIn/NuGet.config @@ -0,0 +1,7 @@ + + + + + + + From 11a030aa2cc72d4b88e9e6f3a60daaafb072a7cd Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Tue, 7 Apr 2026 08:22:34 +0200 Subject: [PATCH 15/18] Also reset package source mapping --- ILSpy.AddIn.VS2022/NuGet.config | 5 +++++ ILSpy.AddIn/NuGet.config | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ILSpy.AddIn.VS2022/NuGet.config b/ILSpy.AddIn.VS2022/NuGet.config index 765346e53..a1abb0d8c 100644 --- a/ILSpy.AddIn.VS2022/NuGet.config +++ b/ILSpy.AddIn.VS2022/NuGet.config @@ -4,4 +4,9 @@ + + + + + diff --git a/ILSpy.AddIn/NuGet.config b/ILSpy.AddIn/NuGet.config index 765346e53..a1abb0d8c 100644 --- a/ILSpy.AddIn/NuGet.config +++ b/ILSpy.AddIn/NuGet.config @@ -4,4 +4,9 @@ + + + + + From 23b94eb8284beb16a53af9921ac7b61620486802 Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Tue, 7 Apr 2026 10:27:23 +0200 Subject: [PATCH 16/18] Clear the packageSourceMappings --- ILSpy.AddIn.VS2022/NuGet.config | 1 + ILSpy.AddIn/NuGet.config | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ILSpy.AddIn.VS2022/NuGet.config b/ILSpy.AddIn.VS2022/NuGet.config index a1abb0d8c..d225cff49 100644 --- a/ILSpy.AddIn.VS2022/NuGet.config +++ b/ILSpy.AddIn.VS2022/NuGet.config @@ -5,6 +5,7 @@ + diff --git a/ILSpy.AddIn/NuGet.config b/ILSpy.AddIn/NuGet.config index a1abb0d8c..c3f2731d1 100644 --- a/ILSpy.AddIn/NuGet.config +++ b/ILSpy.AddIn/NuGet.config @@ -5,8 +5,9 @@ + - + From ca4ef804f59547f945959ea571e5d6082e024f99 Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Tue, 7 Apr 2026 10:57:05 +0200 Subject: [PATCH 17/18] Our vsix or old-style project files --- .github/workflows/build-ilspy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-ilspy.yml b/.github/workflows/build-ilspy.yml index dcbc92b64..96544278f 100644 --- a/.github/workflows/build-ilspy.yml +++ b/.github/workflows/build-ilspy.yml @@ -128,8 +128,8 @@ jobs: - name: Build VS Extensions (for 2017-2019 and 2022) if: matrix.configuration == 'release' && env.BuildAndPublishVsix == 'true' run: | - dotnet msbuild ILSpy.VSExtensions.sln /t:Restore /p:Configuration="Release" /p:Platform="Any CPU" - dotnet msbuild ILSpy.VSExtensions.sln /p:Configuration="Release" /p:Platform="Any CPU" + msbuild ILSpy.VSExtensions.sln /t:Restore /p:Configuration="Release" /p:Platform="Any CPU" + msbuild ILSpy.VSExtensions.sln /p:Configuration="Release" /p:Platform="Any CPU" # https://github.com/actions/upload-artifact - name: Upload VSIX (VS 2019) release build artifacts From f2b41bddaca27ef434221d0ede4b1b9cbe6e5707 Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Tue, 7 Apr 2026 11:23:13 +0200 Subject: [PATCH 18/18] Remove obsolete comment --- .github/workflows/build-ilspy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-ilspy.yml b/.github/workflows/build-ilspy.yml index 96544278f..fa7d05887 100644 --- a/.github/workflows/build-ilspy.yml +++ b/.github/workflows/build-ilspy.yml @@ -21,7 +21,7 @@ jobs: env: BuildPlatform: Any CPU StagingDirectory: buildartifacts - BuildAndPublishVsix: true # temp disable due to usage of transport feed for net11 + BuildAndPublishVsix: true steps: - run: mkdir -p $env:StagingDirectory