Browse Source

Upgrade dotnet target framework to net10

net10upgrade
Siegfried Pammer 2 months ago
parent
commit
b69c58fcc0
  1. 4
      .github/workflows/build-frontends.yml
  2. 18
      .github/workflows/build-ilspy.yml
  3. 4
      .github/workflows/codeql-analysis.yml
  4. 4
      BuildTools/pre-commit
  5. 6
      ICSharpCode.BamlDecompiler/ICSharpCode.BamlDecompiler.csproj
  6. 2
      ICSharpCode.BamlDecompiler/packages.lock.json
  7. 2
      ICSharpCode.Decompiler.TestRunner/ICSharpCode.Decompiler.TestRunner.csproj
  8. 4
      ICSharpCode.Decompiler.Tests/Helpers/Tester.cs
  9. 2
      ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj
  10. 2
      ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj
  11. 6
      ICSharpCode.Decompiler/Properties/DecompilerVersionInfo.template.cs
  12. 4
      ICSharpCode.ILSpyCmd/ICSharpCode.ILSpyCmd.csproj
  13. 2
      ICSharpCode.ILSpyCmd/packages.lock.json
  14. 4
      ICSharpCode.ILSpyX/ICSharpCode.ILSpyX.csproj
  15. 2
      ICSharpCode.ILSpyX/packages.lock.json
  16. 2
      ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj
  17. 2
      ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj
  18. 2
      ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj
  19. 2
      ILSpy.Tests/ILSpy.Tests.csproj
  20. 1
      ILSpy.sln
  21. 2
      ILSpy/ILSpy.csproj
  22. 2
      TestPlugin/TestPlugin.csproj
  23. 2
      global.json

4
.github/workflows/build-frontends.yml

@ -21,8 +21,8 @@ jobs: @@ -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

18
.github/workflows/build-ilspy.yml

@ -34,8 +34,8 @@ jobs: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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'

4
.github/workflows/codeql-analysis.yml

@ -37,8 +37,8 @@ jobs: @@ -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

4
BuildTools/pre-commit

@ -5,11 +5,11 @@ @@ -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

6
ICSharpCode.BamlDecompiler/ICSharpCode.BamlDecompiler.csproj

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\ICSharpCode.Decompiler\ICSharpCode.Decompiler.snk</AssemblyOriginatorKeyFile>
@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
<PropertyGroup>
<PackageId>ICSharpCode.BamlDecompiler</PackageId>
<PackageVersion>8.0.0.0-noversion</PackageVersion>
<PackageVersion>10.0.0.0-noversion</PackageVersion>
<Title>ILSpy BAML Decompiler</Title>
<Authors>ILSpy Contributors</Authors>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
@ -44,7 +44,7 @@ @@ -44,7 +44,7 @@
<!-- https://devblogs.microsoft.com/nuget/enable-repeatable-package-restores-using-a-lock-file/ -->
<PropertyGroup>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<RestoreLockedMode Condition="'$(GITHUB_ACTIONS)' == 'true'">true</RestoreLockedMode>
<RestoreLockedMode>true</RestoreLockedMode>
</PropertyGroup>
<ItemGroup>

2
ICSharpCode.BamlDecompiler/packages.lock.json

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
{
"version": 2,
"dependencies": {
"net8.0": {
"net10.0": {
"Microsoft.Sbom.Targets": {
"type": "Direct",
"requested": "[3.1.0, )",

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

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

4
ICSharpCode.Decompiler.Tests/Helpers/Tester.cs

@ -104,9 +104,9 @@ namespace ICSharpCode.Decompiler.Tests.Helpers @@ -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/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: <Project><ItemGroup><PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0-3.final" />
packagesPropsFile = Path.Combine(TesterPath, "../../../../../Directory.Packages.props");

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

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<TargetFramework>net10.0-windows</TargetFramework>
<RuntimeIdentifier Condition="$(IsWindowsX64) == true">win-x64</RuntimeIdentifier>
<RuntimeIdentifier Condition="$(IsWindowsARM64) == true">win-arm64</RuntimeIdentifier>

2
ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj

@ -51,7 +51,7 @@ @@ -51,7 +51,7 @@
<!-- https://devblogs.microsoft.com/nuget/enable-repeatable-package-restores-using-a-lock-file/ -->
<PropertyGroup>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<RestoreLockedMode Condition="'$(GITHUB_ACTIONS)' == 'true'">true</RestoreLockedMode>
<RestoreLockedMode>true</RestoreLockedMode>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">

6
ICSharpCode.Decompiler/Properties/DecompilerVersionInfo.template.cs

@ -1,10 +1,10 @@ @@ -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$";

4
ICSharpCode.ILSpyCmd/ICSharpCode.ILSpyCmd.csproj

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ServerGarbageCollection>true</ServerGarbageCollection>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPackable>true</IsPackable>
@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@
<!-- https://devblogs.microsoft.com/nuget/enable-repeatable-package-restores-using-a-lock-file/ -->
<PropertyGroup>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<RestoreLockedMode Condition="'$(GITHUB_ACTIONS)' == 'true'">true</RestoreLockedMode>
<RestoreLockedMode>true</RestoreLockedMode>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

2
ICSharpCode.ILSpyCmd/packages.lock.json

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
{
"version": 2,
"dependencies": {
"net8.0": {
"net10.0": {
"McMaster.Extensions.Hosting.CommandLine": {
"type": "Direct",
"requested": "[4.1.1, )",

4
ICSharpCode.ILSpyX/ICSharpCode.ILSpyX.csproj

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<WarningsAsErrors>nullable</WarningsAsErrors>
@ -51,7 +51,7 @@ @@ -51,7 +51,7 @@
<!-- https://devblogs.microsoft.com/nuget/enable-repeatable-package-restores-using-a-lock-file/ -->
<PropertyGroup>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<RestoreLockedMode Condition="'$(GITHUB_ACTIONS)' == 'true'">true</RestoreLockedMode>
<RestoreLockedMode>true</RestoreLockedMode>
</PropertyGroup>
<ItemGroup>

2
ICSharpCode.ILSpyX/packages.lock.json

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
{
"version": 2,
"dependencies": {
"net8.0": {
"net10.0": {
"K4os.Compression.LZ4": {
"type": "Direct",
"requested": "[1.3.8, )",

2
ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<TargetFramework>net10.0-windows</TargetFramework>
<RuntimeIdentifier Condition="$(IsWindowsX64) == true">win-x64</RuntimeIdentifier>
<RuntimeIdentifier Condition="$(IsWindowsARM64) == true">win-arm64</RuntimeIdentifier>

2
ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>ILSpy.BamlDecompiler.Plugin</AssemblyName>
<TargetFramework>net8.0-windows</TargetFramework>
<TargetFramework>net10.0-windows</TargetFramework>
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
<IsPackable>false</IsPackable>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>

2
ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
<PropertyGroup>
<AssemblyName>ILSpy.ReadyToRun.Plugin</AssemblyName>
<TargetFramework>net8.0-windows</TargetFramework>
<TargetFramework>net10.0-windows</TargetFramework>
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<NeutralResourcesLanguage>en-US</NeutralResourcesLanguage>

2
ILSpy.Tests/ILSpy.Tests.csproj

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<TargetFramework>net10.0-windows</TargetFramework>
<IsPackable>false</IsPackable>
<StartupObject>AutoGeneratedProgram</StartupObject>

1
ILSpy.sln

@ -41,6 +41,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution @@ -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

2
ILSpy/ILSpy.csproj

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<TargetFramework>net10.0-windows</TargetFramework>
<RollForward>major</RollForward>
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>

2
TestPlugin/TestPlugin.csproj

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<TargetFramework>net10.0-windows</TargetFramework>
<AssemblyName>Test.Plugin</AssemblyName>
<UseWpf>true</UseWpf>
<EnableWindowsTargeting>true</EnableWindowsTargeting>

2
global.json

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.100",
"version": "10.0.0",
"rollForward": "major",
"allowPrerelease": true
}

Loading…
Cancel
Save