Skip to content

Commit 7b7fc8b

Browse files
Upgrade dotnet target framework to net10
1 parent 03b7444 commit 7b7fc8b

File tree

23 files changed

+44
-43
lines changed

23 files changed

+44
-43
lines changed

.github/workflows/build-frontends.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ jobs:
2121

2222
- uses: actions/setup-dotnet@v4
2323
with:
24-
dotnet-version: '8.0.x'
25-
dotnet-quality: 'ga'
24+
dotnet-version: '10.0.x'
25+
dotnet-quality: 'preview'
2626

2727
- name: Install dependencies
2828
run: dotnet restore ILSpy.XPlat.slnf

.github/workflows/build-ilspy.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ jobs:
3434

3535
- uses: actions/setup-dotnet@v4
3636
with:
37-
dotnet-version: '8.0.x'
38-
dotnet-quality: 'ga'
37+
dotnet-version: '10.0.x'
38+
dotnet-quality: 'preview'
3939
env:
4040
DOTNET_INSTALL_DIR: ${{ runner.temp }}/.dotnet
4141
DOTNET_ROOT: ${{ runner.temp }}/.dotnet
@@ -44,7 +44,7 @@ jobs:
4444
uses: microsoft/setup-msbuild@v2
4545

4646
- name: Install dotnet-format
47-
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
47+
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
4848

4949
- name: Install wix (locked version)
5050
run: dotnet tool install --global wix --version 6.0.0
@@ -65,9 +65,9 @@ jobs:
6565
- name: Execute unit tests
6666
run: dotnet test --logger "trx;LogFileName=${{ matrix.configuration }}.trx" --results-directory test-results $env:Tests1 $env:Tests2 $env:Tests3
6767
env:
68-
Tests1: ICSharpCode.Decompiler.Tests\bin\${{ matrix.configuration }}\net8.0-windows\win-x64\ICSharpCode.Decompiler.Tests.dll
69-
Tests2: ILSpy.Tests\bin\${{ matrix.configuration }}\net8.0-windows\ILSpy.Tests.dll
70-
Tests3: ILSpy.BamlDecompiler.Tests\bin\${{ matrix.configuration }}\net8.0-windows\win-x64\ILSpy.BamlDecompiler.Tests.dll
68+
Tests1: ICSharpCode.Decompiler.Tests\bin\${{ matrix.configuration }}\net10.0-windows\win-x64\ICSharpCode.Decompiler.Tests.dll
69+
Tests2: ILSpy.Tests\bin\${{ matrix.configuration }}\net10.0-windows\ILSpy.Tests.dll
70+
Tests3: ILSpy.BamlDecompiler.Tests\bin\${{ matrix.configuration }}\net10.0-windows\win-x64\ILSpy.BamlDecompiler.Tests.dll
7171

7272
- name: Upload Test Logs
7373
uses: actions/upload-artifact@v4
@@ -94,19 +94,19 @@ jobs:
9494
git diff --exit-code
9595
9696
- name: Zip ILSpy (framework-dependent)
97-
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
97+
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
9898

9999
- name: Publish x64/arm64 framework-dependent/self-contained
100100
shell: pwsh
101101
run: .\publish.ps1
102102

103103
- name: Zip ILSpy Release (x64 self-contained)
104104
if: matrix.configuration == 'release'
105-
run: 7z a -tzip $env:StagingDirectory\ILSpy_selfcontained_x64.zip .\ILSpy\bin\Release\net8.0-windows\win-x64\publish\selfcontained\*
105+
run: 7z a -tzip $env:StagingDirectory\ILSpy_selfcontained_x64.zip .\ILSpy\bin\Release\net10.0-windows\win-x64\publish\selfcontained\*
106106

107107
- name: Zip ILSpy Release (arm64 framework-dependent)
108108
if: matrix.configuration == 'release'
109-
run: 7z a -tzip $env:StagingDirectory\ILSpy_binaries_arm64.zip .\ILSpy\bin\Release\net8.0-windows\win-arm64\publish\fwdependent\*
109+
run: 7z a -tzip $env:StagingDirectory\ILSpy_binaries_arm64.zip .\ILSpy\bin\Release\net10.0-windows\win-arm64\publish\fwdependent\*
110110

111111
- name: Pack NuGets
112112
if: matrix.configuration == 'release'

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ jobs:
3737

3838
- uses: actions/setup-dotnet@v4
3939
with:
40-
dotnet-version: '8.0.x'
41-
dotnet-quality: 'ga'
40+
dotnet-version: '10.0.x'
41+
dotnet-quality: 'preview'
4242

4343
- name: Build
4444
run: dotnet build ILSpy.XPlat.slnf --configuration Release

BuildTools/pre-commit

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55

66
set -eu
77

8-
DOTNET_FORMAT_VERSION=8.3.546805
8+
DOTNET_FORMAT_VERSION=9.0.520307
99
DOTNET_PATH="$LOCALAPPDATA/ICSharpCode/ILSpy/dotnet-format-$DOTNET_FORMAT_VERSION"
1010
if [ ! -d "$DOTNET_PATH" ]; then
1111
echo "Downloading dotnet-format $DOTNET_FORMAT_VERSION..."
12-
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"
12+
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"
1313
fi
1414

1515
"$DOTNET_PATH/dotnet-format.exe" --version

ICSharpCode.BamlDecompiler/ICSharpCode.BamlDecompiler.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55

66
<SignAssembly>True</SignAssembly>
77
<AssemblyOriginatorKeyFile>..\ICSharpCode.Decompiler\ICSharpCode.Decompiler.snk</AssemblyOriginatorKeyFile>
@@ -14,7 +14,7 @@
1414

1515
<PropertyGroup>
1616
<PackageId>ICSharpCode.BamlDecompiler</PackageId>
17-
<PackageVersion>8.0.0.0-noversion</PackageVersion>
17+
<PackageVersion>10.0.0.0-noversion</PackageVersion>
1818
<Title>ILSpy BAML Decompiler</Title>
1919
<Authors>ILSpy Contributors</Authors>
2020
<PackageLicenseExpression>MIT</PackageLicenseExpression>
@@ -44,7 +44,7 @@
4444
<!-- https://devblogs.microsoft.com/nuget/enable-repeatable-package-restores-using-a-lock-file/ -->
4545
<PropertyGroup>
4646
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
47-
<RestoreLockedMode Condition="'$(GITHUB_ACTIONS)' == 'true'">true</RestoreLockedMode>
47+
<RestoreLockedMode>true</RestoreLockedMode>
4848
</PropertyGroup>
4949

5050
<ItemGroup>

ICSharpCode.BamlDecompiler/packages.lock.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"version": 2,
33
"dependencies": {
4-
"net8.0": {
4+
"net10.0": {
55
"Microsoft.Sbom.Targets": {
66
"type": "Direct",
77
"requested": "[3.1.0, )",

ICSharpCode.Decompiler.TestRunner/ICSharpCode.Decompiler.TestRunner.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net8.0</TargetFramework>
5+
<TargetFramework>net10.0</TargetFramework>
66
<Nullable>enable</Nullable>
77
</PropertyGroup>
88

ICSharpCode.Decompiler.Tests/Helpers/Tester.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ static Tester()
104104
TesterPath = Path.GetDirectoryName(typeof(Tester).Assembly.Location);
105105
TestCasePath = Path.Combine(TesterPath, "../../../../TestCases");
106106
#if DEBUG
107-
testRunnerBasePath = Path.Combine(TesterPath, "../../../../../ICSharpCode.Decompiler.TestRunner/bin/Debug/net8.0");
107+
testRunnerBasePath = Path.Combine(TesterPath, "../../../../../ICSharpCode.Decompiler.TestRunner/bin/Debug/net10.0");
108108
#else
109-
testRunnerBasePath = Path.Combine(TesterPath, "../../../../../ICSharpCode.Decompiler.TestRunner/bin/Release/net8.0");
109+
testRunnerBasePath = Path.Combine(TesterPath, "../../../../../ICSharpCode.Decompiler.TestRunner/bin/Release/net10.0");
110110
#endif
111111
// To parse: <Project><ItemGroup><PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0-3.final" />
112112
packagesPropsFile = Path.Combine(TesterPath, "../../../../../Directory.Packages.props");
@@ -276,8 +276,8 @@ private static string ReplacePrivImplDetails(string il)
276276
}
277277

278278
static readonly string coreRefAsmPath = new DotNetCorePathFinder(TargetFrameworkIdentifier.NET,
279-
new Version(8, 0), "Microsoft.NETCore.App")
280-
.GetReferenceAssemblyPath(".NETCoreApp,Version=v8.0");
279+
new Version(10, 0), "Microsoft.NETCore.App")
280+
.GetReferenceAssemblyPath(".NETCoreApp,Version=v10.0");
281281

282282
public static readonly string RefAsmPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86),
283283
@"Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2");
@@ -315,7 +315,7 @@ private static string ReplacePrivImplDetails(string il)
315315

316316
const string targetFrameworkAttributeSnippet = @"
317317
318-
[assembly: System.Runtime.Versioning.TargetFramework("".NETCoreApp,Version=v8.0"", FrameworkDisplayName = """")]
318+
[assembly: System.Runtime.Versioning.TargetFramework("".NETCoreApp,Version=v10.0"", FrameworkDisplayName = """")]
319319
320320
";
321321

ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<PropertyGroup>
10-
<TargetFramework>net8.0-windows</TargetFramework>
10+
<TargetFramework>net10.0-windows</TargetFramework>
1111
<RuntimeIdentifier Condition="$(IsWindowsX64) == true">win-x64</RuntimeIdentifier>
1212
<RuntimeIdentifier Condition="$(IsWindowsARM64) == true">win-arm64</RuntimeIdentifier>
1313

ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
<!-- https://devblogs.microsoft.com/nuget/enable-repeatable-package-restores-using-a-lock-file/ -->
5252
<PropertyGroup>
5353
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
54-
<RestoreLockedMode Condition="'$(GITHUB_ACTIONS)' == 'true'">true</RestoreLockedMode>
54+
<RestoreLockedMode>true</RestoreLockedMode>
5555
</PropertyGroup>
5656

5757
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">

0 commit comments

Comments
 (0)