From 6e5c2f965ccf62c9e3d6d86c13bc4e67315a7e86 Mon Sep 17 00:00:00 2001
From: ds5678 <49847914+ds5678@users.noreply.github.com>
Date: Fri, 18 Apr 2025 22:13:44 -0700
Subject: [PATCH] Bump TestRunner to .NET 9
---
.../ICSharpCode.Decompiler.TestRunner.csproj | 2 +-
ICSharpCode.Decompiler.Tests/Helpers/Tester.cs | 17 ++++++++---------
README.md | 10 +++++-----
global.json | 2 +-
4 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/ICSharpCode.Decompiler.TestRunner/ICSharpCode.Decompiler.TestRunner.csproj b/ICSharpCode.Decompiler.TestRunner/ICSharpCode.Decompiler.TestRunner.csproj
index af31fefa2..7be97c906 100644
--- a/ICSharpCode.Decompiler.TestRunner/ICSharpCode.Decompiler.TestRunner.csproj
+++ b/ICSharpCode.Decompiler.TestRunner/ICSharpCode.Decompiler.TestRunner.csproj
@@ -2,7 +2,7 @@
Exe
- net8.0
+ net9.0
enable
diff --git a/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs b/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs
index 7d7e33f8f..f4e2826d9 100644
--- a/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs
+++ b/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs
@@ -104,9 +104,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/net9.0");
#else
- testRunnerBasePath = Path.Combine(TesterPath, "../../../../../ICSharpCode.Decompiler.TestRunner/bin/Release/net8.0");
+ testRunnerBasePath = Path.Combine(TesterPath, "../../../../../ICSharpCode.Decompiler.TestRunner/bin/Release/net9.0");
#endif
// To parse:
packagesPropsFile = Path.Combine(TesterPath, "../../../../../Directory.Packages.props");
@@ -276,8 +276,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(9, 0), "Microsoft.NETCore.App")
+ .GetReferenceAssemblyPath(".NETCoreApp,Version=v9.0");
public static readonly string RefAsmPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86),
@"Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2");
@@ -313,11 +313,9 @@ namespace ICSharpCode.Decompiler.Tests.Helpers
"Microsoft.VisualBasic.dll",
};
- const string targetFrameworkAttributeSnippet = @"
-
-[assembly: System.Runtime.Versioning.TargetFramework("".NETCoreApp,Version=v8.0"", FrameworkDisplayName = """")]
-
-";
+ const string targetFrameworkAttributeSnippet = """
+ [assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v9.0", FrameworkDisplayName = "")]
+ """;
static readonly Lazy targetFrameworkAttributeSnippetFile = new Lazy(GetTargetFrameworkAttributeSnippetFile);
@@ -391,6 +389,7 @@ namespace System.Runtime.CompilerServices
preprocessorSymbols.Add("NET60");
preprocessorSymbols.Add("NET70");
preprocessorSymbols.Add("NET80");
+ preprocessorSymbols.Add("NET90");
}
preprocessorSymbols.Add("ROSLYN");
preprocessorSymbols.Add("CS60");
diff --git a/README.md b/README.md
index 2a68789b7..92c8d340b 100644
--- a/README.md
+++ b/README.md
@@ -48,11 +48,11 @@ How to build
- Make sure Windows PowerShell (at least version) 5.0 or [PowerShell](https://github.com/PowerShell/PowerShell) 7+ is installed.
- Clone the ILSpy repository using git.
- Execute `git submodule update --init --recursive` to download the ILSpy-Tests submodule (used by some test cases).
-- Install Visual Studio (documented version: 17.8). You can install the necessary components in one of 3 ways:
+- Install Visual Studio (documented version: 17.12). You can install the necessary components in one of 3 ways:
- Follow Microsoft's instructions for [importing a configuration](https://docs.microsoft.com/en-us/visualstudio/install/import-export-installation-configurations?view=vs-2022#import-a-configuration), and import the .vsconfig file located at the root of the solution.
- Alternatively, you can open the ILSpy solution (ILSpy.sln) and Visual Studio will [prompt you to install the missing components](https://docs.microsoft.com/en-us/visualstudio/install/import-export-installation-configurations?view=vs-2022#automatically-install-missing-components).
- Finally, you can manually install the necessary components via the Visual Studio Installer. The workloads/components are as follows:
- - Workload ".NET Desktop Development". This workload includes the .NET Framework 4.8 SDK and the .NET Framework 4.7.2 targeting pack, as well as the [.NET 8.0 SDK](https://dotnet.microsoft.com/download/dotnet/8.0) (ILSpy.csproj targets .NET 8.0, but we have net472 projects too). _Note: The optional components of this workload are not required for ILSpy_
+ - Workload ".NET Desktop Development". This workload includes the .NET Framework 4.8 SDK and the .NET Framework 4.7.2 targeting pack, as well as the [.NET 9.0 SDK](https://dotnet.microsoft.com/download/dotnet/9.0) (ILSpy.csproj targets .NET 8.0, but we have net472 projects too). _Note: The optional components of this workload are not required for ILSpy_
- Workload "Visual Studio extension development" (ILSpy.sln contains a VS extension project) _Note: The optional components of this workload are not required for ILSpy_
- Individual Component "MSVC v143 - VS 2022 C++ x64/x86 build tools" (or similar)
- _The VC++ toolset is optional_; if present it is used for `editbin.exe` to modify the stack size used by ILSpy.exe from 1MB to 16MB, because the decompiler makes heavy use of recursion, where small stack sizes lead to problems in very complex methods.
@@ -66,12 +66,12 @@ How to build
- ILSpy.AddIn.slnf: for the Visual Studio plugin
**Note:** Visual Studio includes a version of the .NET SDK that is managed by the Visual Studio installer - once you update, it may get upgraded too.
-Please note that ILSpy is only compatible with the .NET 8.0 SDK and Visual Studio will refuse to load some projects in the solution (and unit tests will fail).
-If this problem occurs, please manually install the .NET 8.0 SDK from [here](https://dotnet.microsoft.com/download/dotnet/8.0).
+Please note that ILSpy is only compatible with the .NET 9.0 SDK and Visual Studio will refuse to load some projects in the solution (and unit tests will fail).
+If this problem occurs, please manually install the .NET 9.0 SDK from [here](https://dotnet.microsoft.com/download/dotnet/9.0).
#### Unix / Mac:
-- Make sure [.NET 8.0 SDK](https://dotnet.microsoft.com/download/dotnet/8.0) is installed.
+- Make sure [.NET 9.0 SDK](https://dotnet.microsoft.com/download/dotnet/9.0) is installed.
- Make sure [PowerShell](https://github.com/PowerShell/PowerShell) is installed (formerly known as PowerShell Core)
- Clone the repository using git.
- Execute `git submodule update --init --recursive` to download the ILSpy-Tests submodule (used by some test cases).
diff --git a/global.json b/global.json
index 6a5d4badd..a52d00a7e 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,6 @@
{
"sdk": {
- "version": "8.0.100",
+ "version": "9.0.100",
"rollForward": "major",
"allowPrerelease": true
}