diff --git a/.github/workflows/build-frontends.yml b/.github/workflows/build-frontends.yml
index 5f437b3d1f..67d3bee5b8 100644
--- a/.github/workflows/build-frontends.yml
+++ b/.github/workflows/build-frontends.yml
@@ -14,10 +14,10 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- - name: Setup .NET
- uses: actions/setup-dotnet@v3
+ - uses: actions/setup-dotnet@v4
with:
- dotnet-version: 6.0.x
+ dotnet-version: '8.0.x'
+ dotnet-quality: 'ga'
- name: Install dependencies
run: dotnet restore ILSpy.XPlat.slnf
diff --git a/.github/workflows/build-ilspy.yml b/.github/workflows/build-ilspy.yml
index acc6c810cf..d2c9b6ab0f 100644
--- a/.github/workflows/build-ilspy.yml
+++ b/.github/workflows/build-ilspy.yml
@@ -26,6 +26,11 @@ jobs:
submodules: true
fetch-depth: 0
+ - uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: '8.0.x'
+ dotnet-quality: 'ga'
+
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.3
@@ -48,9 +53,9 @@ jobs:
- name: Execute unit tests
run: dotnet test --logger "junit;LogFileName=${{ matrix.configuration }}.xml" --results-directory test-results $env:Tests1 $env:Tests2 $env:Tests3
env:
- Tests1: ICSharpCode.Decompiler.Tests\bin\${{ matrix.configuration }}\net6.0-windows\win-x64\ICSharpCode.Decompiler.Tests.dll
- Tests2: ILSpy.Tests\bin\${{ matrix.configuration }}\net6.0-windows\ILSpy.Tests.dll
- Tests3: ILSpy.BamlDecompiler.Tests\bin\${{ matrix.configuration }}\net6.0-windows\win-x64\ILSpy.BamlDecompiler.Tests.dll
+ 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
- name: Upload Test Logs
uses: actions/upload-artifact@v3
@@ -76,7 +81,7 @@ jobs:
git diff --exit-code
- name: Zip ILSpy (framework-dependent)
- run: 7z a -tzip $env:StagingDirectory\ILSpy_binaries.zip .\ILSpy\bin\${{ matrix.configuration }}\net6.0-windows\*.dll .\ILSpy\bin\${{ matrix.configuration }}\net6.0-windows\*.exe .\ILSpy\bin\${{ matrix.configuration }}\net6.0-windows\*.config .\ILSpy\bin\${{ matrix.configuration }}\net6.0-windows\*.json .\ILSpy\bin\${{ matrix.configuration }}\net6.0-windows\*\ILSpy.resources.dll .\ILSpy\bin\${{ matrix.configuration }}\net6.0-windows\*\ILSpy.ReadyToRun.Plugin.resources.dll
+ 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
- name: Publish x64/arm64 framework-dependent/self-contained
shell: pwsh
@@ -84,11 +89,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\net6.0-windows\win-x64\publish\selfcontained\*
+ run: 7z a -tzip $env:StagingDirectory\ILSpy_selfcontained_x64.zip .\ILSpy\bin\Release\net8.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\net6.0-windows\win-arm64\publish\fwdependent\*
+ run: 7z a -tzip $env:StagingDirectory\ILSpy_binaries_arm64.zip .\ILSpy\bin\Release\net8.0-windows\win-arm64\publish\fwdependent\*
- name: Build Installer (x64 and arm64, framework-dependent)
if: matrix.configuration == 'release'
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 93daa6d31a..1886a05af7 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -23,17 +23,17 @@ jobs:
fetch-depth: 0
- name: Initialize CodeQL
- uses: github/codeql-action/init@v2
+ uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
- - name: Setup .NET
- uses: actions/setup-dotnet@v3
+ - uses: actions/setup-dotnet@v4
with:
- dotnet-version: 6.0.x
+ dotnet-version: '8.0.x'
+ dotnet-quality: 'ga'
- name: Build
run: dotnet build ILSpy.XPlat.slnf --configuration Release
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v2
+ uses: github/codeql-action/analyze@v3
diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml
index f3de4cb41f..3bc404b704 100644
--- a/.github/workflows/lock.yml
+++ b/.github/workflows/lock.yml
@@ -8,7 +8,7 @@ jobs:
lock:
runs-on: ubuntu-latest
steps:
- - uses: dessant/lock-threads@v4.0.1
+ - uses: dessant/lock-threads@v5.0.1
with:
github-token: ${{ github.token }}
issue-inactive-days: '90'
diff --git a/Directory.Packages.props b/Directory.Packages.props
new file mode 100644
index 0000000000..a8c2b5f8e0
--- /dev/null
+++ b/Directory.Packages.props
@@ -0,0 +1,46 @@
+
+
+ true
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ICSharpCode.Decompiler.PowerShell/ICSharpCode.Decompiler.PowerShell.csproj b/ICSharpCode.Decompiler.PowerShell/ICSharpCode.Decompiler.PowerShell.csproj
index c50801c161..f5d58901fe 100644
--- a/ICSharpCode.Decompiler.PowerShell/ICSharpCode.Decompiler.PowerShell.csproj
+++ b/ICSharpCode.Decompiler.PowerShell/ICSharpCode.Decompiler.PowerShell.csproj
@@ -8,11 +8,9 @@
8.0
-
-
-
-
+
+
diff --git a/ICSharpCode.Decompiler.TestRunner/ICSharpCode.Decompiler.TestRunner.csproj b/ICSharpCode.Decompiler.TestRunner/ICSharpCode.Decompiler.TestRunner.csproj
index 8c8d40ddc3..af31fefa23 100644
--- a/ICSharpCode.Decompiler.TestRunner/ICSharpCode.Decompiler.TestRunner.csproj
+++ b/ICSharpCode.Decompiler.TestRunner/ICSharpCode.Decompiler.TestRunner.csproj
@@ -2,7 +2,7 @@
Exe
- net7.0
+ net8.0
enable
diff --git a/ICSharpCode.Decompiler.Tests/CorrectnessTestRunner.cs b/ICSharpCode.Decompiler.Tests/CorrectnessTestRunner.cs
index ed4a3f2bb2..5246e5d27b 100644
--- a/ICSharpCode.Decompiler.Tests/CorrectnessTestRunner.cs
+++ b/ICSharpCode.Decompiler.Tests/CorrectnessTestRunner.cs
@@ -46,7 +46,7 @@ public void AllFilesHaveTests()
if (file.Extension == ".txt" || file.Extension == ".exe" || file.Extension == ".config")
continue;
var testName = Path.GetFileNameWithoutExtension(file.Name);
- Assert.Contains(testName, testNames);
+ Assert.That(testNames, Has.Member(testName));
}
}
@@ -486,7 +486,7 @@ async Task RunIL(string testFileName, CompilerOptions options = CompilerOptions.
bool optionsForce32Bit = options.HasFlag(CompilerOptions.Force32Bit);
bool asmOptionsForce32Bit = asmOptions.HasFlag(AssemblerOptions.Force32Bit);
- Assert.AreEqual(optionsForce32Bit, asmOptionsForce32Bit, "Inconsistent architecture.");
+ Assert.That(asmOptionsForce32Bit, Is.EqualTo(optionsForce32Bit), "Inconsistent architecture.");
try
{
diff --git a/ICSharpCode.Decompiler.Tests/DataFlowTest.cs b/ICSharpCode.Decompiler.Tests/DataFlowTest.cs
index cfe14be750..7a1c200fa9 100644
--- a/ICSharpCode.Decompiler.Tests/DataFlowTest.cs
+++ b/ICSharpCode.Decompiler.Tests/DataFlowTest.cs
@@ -45,11 +45,11 @@ public RDTest(ILFunction f, ILVariable v) : base(f, _ => true, CancellationToken
protected internal override void VisitTryFinally(TryFinally inst)
{
- Assert.IsTrue(IsPotentiallyUninitialized(state, v));
+ Assert.That(IsPotentiallyUninitialized(state, v));
base.VisitTryFinally(inst);
- Assert.IsTrue(state.IsReachable);
- Assert.AreEqual(1, GetStores(state, v).Count());
- Assert.IsFalse(IsPotentiallyUninitialized(state, v));
+ Assert.That(state.IsReachable);
+ Assert.That(GetStores(state, v).Count(), Is.EqualTo(1));
+ Assert.That(!IsPotentiallyUninitialized(state, v));
}
}
diff --git a/ICSharpCode.Decompiler.Tests/DisassemblerPrettyTestRunner.cs b/ICSharpCode.Decompiler.Tests/DisassemblerPrettyTestRunner.cs
index 9636facc1c..9fa9e7e855 100644
--- a/ICSharpCode.Decompiler.Tests/DisassemblerPrettyTestRunner.cs
+++ b/ICSharpCode.Decompiler.Tests/DisassemblerPrettyTestRunner.cs
@@ -47,7 +47,7 @@ public void AllFilesHaveTests()
if (file.Extension.Equals(".il", StringComparison.OrdinalIgnoreCase))
{
var testName = file.Name.Split('.')[0];
- Assert.Contains(testName, testNames);
+ Assert.That(testNames, Has.Member(testName));
}
}
}
diff --git a/ICSharpCode.Decompiler.Tests/Helpers/Tester.VB.cs b/ICSharpCode.Decompiler.Tests/Helpers/Tester.VB.cs
index 2c84b6180e..6b8e403e37 100644
--- a/ICSharpCode.Decompiler.Tests/Helpers/Tester.VB.cs
+++ b/ICSharpCode.Decompiler.Tests/Helpers/Tester.VB.cs
@@ -133,7 +133,7 @@ public static async Task CompileVB(string sourceFileName, Compi
{
Console.WriteLine("errors:" + Environment.NewLine + result.StandardError);
}
- Assert.AreEqual(0, result.ExitCode, "vbc failed");
+ Assert.That(result.ExitCode, Is.EqualTo(0), "vbc failed");
return results;
}
diff --git a/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs b/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs
index cd3f185dad..ecbcf5c1b7 100644
--- a/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs
+++ b/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs
@@ -105,12 +105,19 @@ static Tester()
TesterPath = Path.GetDirectoryName(typeof(Tester).Assembly.Location);
TestCasePath = Path.Combine(TesterPath, "../../../../TestCases");
#if DEBUG
- testRunnerBasePath = Path.Combine(TesterPath, "../../../../../ICSharpCode.Decompiler.TestRunner/bin/Debug/net7.0");
+ testRunnerBasePath = Path.Combine(TesterPath, "../../../../../ICSharpCode.Decompiler.TestRunner/bin/Debug/net8.0");
#else
- testRunnerBasePath = Path.Combine(TesterPath, "../../../../../ICSharpCode.Decompiler.TestRunner/bin/Release/net7.0");
+ testRunnerBasePath = Path.Combine(TesterPath, "../../../../../ICSharpCode.Decompiler.TestRunner/bin/Release/net8.0");
#endif
- packagesPropsFile = Path.Combine(TesterPath, "../../../../../packages.props");
- roslynLatestVersion = XDocument.Load(packagesPropsFile).XPathSelectElement("//RoslynVersion").Value;
+ // To parse:
+ packagesPropsFile = Path.Combine(TesterPath, "../../../../../Directory.Packages.props");
+ roslynLatestVersion = ((IEnumerable