Skip to content

Commit 3228657

Browse files
authored
Upgrade to net10 (#135)
* Commit upgrade plan * Update DotnetPackaging.csproj to target net10.0 Changed the target framework in DotnetPackaging.csproj from net8.0 to net10.0, ensuring the project uses the latest .NET version. No other project settings were modified. * Update target framework to net10.0 in DotnetPackaging.Deb.csproj Changed the target framework from net8.0 to net10.0 in the DotnetPackaging.Deb.csproj file to support the latest .NET version. No other project settings were modified. * Update target framework to net10.0 in DotnetPackaging.Exe.csproj Changed the target framework in DotnetPackaging.Exe.csproj from net8.0 to net10.0 to support newer .NET features and improvements. No other project settings were modified. * * 'Line 156: Used the alias IOPath for System.IO.Path to resolve ambiguity. Line 30: Used the alias IOPath for System.IO.Path to resolve ambiguity. Line 4: Added an alias for System.IO.Path to resolve ambiguity between Zafiro.DivineBytes.Path and System.IO.Path. Line 51: Used the alias IOPath for System.IO.Path to resolve ambiguity. Line 86: Used the alias IOPath for System.IO.Path to resolve ambiguity.' in file 'src\DotnetPackaging.Exe\SimpleExePacker.cs' * Update target framework to net10.0-windows in .csproj Changed DotnetPackaging.Exe.Installer.csproj to target net10.0-windows instead of net8.0-windows. Also made a minor formatting adjustment to the AvaloniaUI.DiagnosticsSupport package reference line. No other dependencies or settings were modified. * Update target framework to net10.0 in DotnetPackaging.Msix.csproj Changed the target framework from net8.0 to net10.0 in DotnetPackaging.Msix.csproj. Also made a minor formatting adjustment to the System.IO.Hashing package reference. * Update target framework to net10.0 in DotnetPackaging.Dmg.csproj Changed the target framework from net8.0 to net10.0 in the DotnetPackaging.Dmg.csproj file to support the latest .NET version. No other modifications were made. * Update target framework to net10.0 in DotnetPackaging.AppImage.csproj Changed the target framework from net8.0 to net10.0 in the DotnetPackaging.AppImage.csproj file to support the latest .NET version. No other project settings were modified. * Update DotnetPackaging.Rpm.csproj to net10.0 Changed the target framework in DotnetPackaging.Rpm.csproj from net8.0 to net10.0 to support the latest .NET version. No other modifications were made. * Update target framework to net10.0 in DotnetPackaging.Flatpak.csproj Changed the target framework from net8.0 to net10.0 in the DotnetPackaging.Flatpak.csproj file to support the latest .NET version. No other project settings were modified. * Update target framework to net10.0-windows in csproj Changed the TargetFramework in DotnetPackaging.Exe.Tests.csproj from net8.0-windows to net10.0-windows to support the latest .NET version for Windows. No other project settings were modified. * Update DotnetPackaging.Msix.Tests.csproj to net10.0 Changed target framework from net8.0 to net10.0. Reformatted package references for consistency by adding spaces before closing tags. No changes to package versions or dependencies. * Update target framework to net10.0 in DotnetPackaging.Dmg.Tests.csproj Changed the TargetFramework property in DotnetPackaging.Dmg.Tests.csproj from net8.0 to net10.0 to use the latest .NET version for testing. No other project settings were modified. * Update DotnetPackaging.AppImage.Tests.csproj to net10.0 Changed target framework from net9.0 to net10.0. Reformatted package references and other XML elements for consistency by adding spaces before closing tags. No changes to package versions or dependencies. * Update target framework to net10.0 in DotnetPackaging.Flatpak.Tests.csproj Changed the target framework from net9.0 to net10.0 in the DotnetPackaging.Flatpak.Tests.csproj file to support the latest .NET version. No other project settings were modified. * Update DotnetPackaging.Tool.csproj to net10.0 Changed the target framework in DotnetPackaging.Tool.csproj from net8.0 to net10.0 to support the latest major .NET version. Other project settings remain unchanged. * Upgrade Azure Pipelines to use .NET SDK 10.x Updated the Azure Pipelines configuration to use .NET SDK version 10.x, replacing versions 9.x and 8.x. Removed the task for .NET SDK 8.x to streamline the pipeline. Ensured the .NET SDK is available before installing tools, while retaining the GitVersion tool installation step.
1 parent bea83b6 commit 3228657

File tree

18 files changed

+142
-41
lines changed

18 files changed

+142
-41
lines changed
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# .NET 10.0 Upgrade Plan
2+
3+
## Execution Steps
4+
5+
Execute steps below sequentially one by one in the order they are listed.
6+
7+
1. Validate that a .NET 10.0 SDK required for this upgrade is installed on the machine and if not, help to get it installed.
8+
2. Ensure that the SDK version specified in global.json files is compatible with the .NET 10.0 upgrade.
9+
3. Upgrade src\DotnetPackaging\DotnetPackaging.csproj
10+
4. Upgrade src\DotnetPackaging.Deb\DotnetPackaging.Deb.csproj
11+
5. Upgrade src\DotnetPackaging.Exe\DotnetPackaging.Exe.csproj
12+
6. Upgrade src\DotnetPackaging.Exe.Installer\DotnetPackaging.Exe.Installer.csproj
13+
7. Upgrade src\DotnetPackaging.Msix\DotnetPackaging.Msix.csproj
14+
8. Upgrade src\DotnetPackaging.Dmg\DotnetPackaging.Dmg.csproj
15+
9. Upgrade src\DotnetPackaging.AppImage\DotnetPackaging.AppImage.csproj
16+
10. Upgrade src\DotnetPackaging.Rpm\DotnetPackaging.Rpm.csproj
17+
11. Upgrade src\DotnetPackaging.Flatpak\DotnetPackaging.Flatpak.csproj
18+
12. Upgrade test\DotnetPackaging.Exe.Tests\DotnetPackaging.Exe.Tests.csproj
19+
13. Upgrade test\DotnetPackaging.Msix.Tests\DotnetPackaging.Msix.Tests.csproj
20+
14. Upgrade test\DotnetPackaging.Dmg.Tests\DotnetPackaging.Dmg.Tests.csproj
21+
15. Upgrade test\DotnetPackaging.AppImage.Tests\DotnetPackaging.AppImage.Tests.csproj
22+
16. Upgrade test\DotnetPackaging.Flatpak.Tests\DotnetPackaging.Flatpak.Tests.csproj
23+
17. Upgrade src\DotnetPackaging.Tool\DotnetPackaging.Tool.csproj
24+
25+
## Settings
26+
27+
This section contains settings and data used by execution steps.
28+
29+
### Project upgrade details
30+
31+
This section contains details about each project upgrade and modifications that need to be done in the project.
32+
33+
#### src\DotnetPackaging\DotnetPackaging.csproj modifications
34+
35+
Project properties changes:
36+
- Target framework should be changed from `net8.0` to `net10.0`
37+
38+
#### src\DotnetPackaging.Deb\DotnetPackaging.Deb.csproj modifications
39+
40+
Project properties changes:
41+
- Target framework should be changed from `net8.0` to `net10.0`
42+
43+
#### src\DotnetPackaging.Exe\DotnetPackaging.Exe.csproj modifications
44+
45+
Project properties changes:
46+
- Target framework should be changed from `net8.0` to `net10.0`
47+
48+
#### src\DotnetPackaging.Exe.Installer\DotnetPackaging.Exe.Installer.csproj modifications
49+
50+
Project properties changes:
51+
- Target framework should be changed from `net8.0-windows` to `net10.0-windows`
52+
53+
#### src\DotnetPackaging.Msix\DotnetPackaging.Msix.csproj modifications
54+
55+
Project properties changes:
56+
- Target framework should be changed from `net8.0` to `net10.0`
57+
58+
#### src\DotnetPackaging.Dmg\DotnetPackaging.Dmg.csproj modifications
59+
60+
Project properties changes:
61+
- Target framework should be changed from `net8.0` to `net10.0`
62+
63+
#### src\DotnetPackaging.AppImage\DotnetPackaging.AppImage.csproj modifications
64+
65+
Project properties changes:
66+
- Target framework should be changed from `net8.0` to `net10.0`
67+
68+
#### src\DotnetPackaging.Rpm\DotnetPackaging.Rpm.csproj modifications
69+
70+
Project properties changes:
71+
- Target framework should be changed from `net8.0` to `net10.0`
72+
73+
#### src\DotnetPackaging.Flatpak\DotnetPackaging.Flatpak.csproj modifications
74+
75+
Project properties changes:
76+
- Target framework should be changed from `net8.0` to `net10.0`
77+
78+
#### test\DotnetPackaging.Exe.Tests\DotnetPackaging.Exe.Tests.csproj modifications
79+
80+
Project properties changes:
81+
- Target framework should be changed from `net8.0-windows` to `net10.0-windows`
82+
83+
#### test\DotnetPackaging.Msix.Tests\DotnetPackaging.Msix.Tests.csproj modifications
84+
85+
Project properties changes:
86+
- Target framework should be changed from `net8.0` to `net10.0`
87+
88+
#### test\DotnetPackaging.Dmg.Tests\DotnetPackaging.Dmg.Tests.csproj modifications
89+
90+
Project properties changes:
91+
- Target framework should be changed from `net8.0` to `net10.0`
92+
93+
#### test\DotnetPackaging.AppImage.Tests\DotnetPackaging.AppImage.Tests.csproj modifications
94+
95+
Project properties changes:
96+
- Target framework should be changed from `net9.0` to `net10.0`
97+
98+
#### test\DotnetPackaging.Flatpak.Tests\DotnetPackaging.Flatpak.Tests.csproj modifications
99+
100+
Project properties changes:
101+
- Target framework should be changed from `net9.0` to `net10.0`
102+
103+
#### src\DotnetPackaging.Tool\DotnetPackaging.Tool.csproj modifications
104+
105+
Project properties changes:
106+
- Target framework should be changed from `net8.0` to `net10.0`

azure-pipelines.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,10 @@ steps:
1717

1818
# Ensure .NET SDK available before installing tools
1919
- task: UseDotNet@2
20-
displayName: 'Use .NET 9.x'
20+
displayName: 'Use .NET 10.x'
2121
inputs:
2222
packageType: 'sdk'
23-
version: '9.x'
24-
25-
- task: UseDotNet@2
26-
displayName: 'Use .NET 8.x'
27-
inputs:
28-
packageType: 'sdk'
29-
version: '8.x'
23+
version: '10.x'
3024

3125
# GitVersion: compute semantic version and expose variables
3226
- pwsh: |

src/DotnetPackaging.AppImage/DotnetPackaging.AppImage.csproj

Lines changed: 1 addition & 1 deletion
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
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
</PropertyGroup>

src/DotnetPackaging.Deb/DotnetPackaging.Deb.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net8.0</TargetFramework>
3+
<TargetFramework>net10.0</TargetFramework>
44
<ImplicitUsings>enable</ImplicitUsings>
55
<Nullable>enable</Nullable>
66
</PropertyGroup>

src/DotnetPackaging.Dmg/DotnetPackaging.Dmg.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net8.0</TargetFramework>
3+
<TargetFramework>net10.0</TargetFramework>
44
<ImplicitUsings>enable</ImplicitUsings>
55
<Nullable>enable</Nullable>
66
</PropertyGroup>

src/DotnetPackaging.Exe.Installer/DotnetPackaging.Exe.Installer.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>WinExe</OutputType>
4-
<TargetFramework>net8.0-windows</TargetFramework>
4+
<TargetFramework>net10.0-windows</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<UseWPF>false</UseWPF>
@@ -36,7 +36,7 @@
3636
<PackageReference Include="Avalonia.Desktop" />
3737
<PackageReference Include="Avalonia.Fonts.Inter" />
3838
<PackageReference Include="Avalonia.Themes.Fluent" />
39-
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="AvaloniaUI.DiagnosticsSupport"/>
39+
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="AvaloniaUI.DiagnosticsSupport" />
4040
<PackageReference Include="ReactiveProperty" />
4141
<PackageReference Include="ReactiveUI.Avalonia" />
4242
<PackageReference Include="Serilog" />

src/DotnetPackaging.Exe/DotnetPackaging.Exe.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net8.0</TargetFramework>
3+
<TargetFramework>net10.0</TargetFramework>
44
<ImplicitUsings>enable</ImplicitUsings>
55
<Nullable>enable</Nullable>
66
<IsPackable>true</IsPackable>

src/DotnetPackaging.Exe/SimpleExePacker.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.Text.Json;
33
using CSharpFunctionalExtensions;
44
using Zafiro.DivineBytes;
5+
using IOPath = System.IO.Path;
56
using Zafiro.FileSystem.Core;
67

78
namespace DotnetPackaging.Exe;
@@ -27,7 +28,7 @@ public static async Task<Result> Build(
2728
return Result.Failure($"Publish directory not found: {publishDir}");
2829
}
2930

30-
var outputDirectory = Path.GetDirectoryName(outputPath);
31+
var outputDirectory = IOPath.GetDirectoryName(outputPath);
3132
if (string.IsNullOrWhiteSpace(outputDirectory))
3233
{
3334
return Result.Failure("Output directory cannot be determined.");
@@ -48,7 +49,7 @@ public static async Task<Result> Build(
4849
}
4950

5051
Directory.CreateDirectory(outputDirectory);
51-
var uninstallerPath = Path.Combine(outputDirectory, "Uninstaller.exe");
52+
var uninstallerPath = IOPath.Combine(outputDirectory, "Uninstaller.exe");
5253
await Persist(bundleResult.Value.Installer, outputPath);
5354
await Persist(bundleResult.Value.Uninstaller, uninstallerPath);
5455

@@ -83,7 +84,7 @@ public static async Task<Result<SimpleExeBundle>> Build(
8384

8485
private static async Task Persist(INamedByteSource artifact, string path)
8586
{
86-
Directory.CreateDirectory(Path.GetDirectoryName(path)!);
87+
Directory.CreateDirectory(IOPath.GetDirectoryName(path)!);
8788
await using var input = artifact.ToStreamSeekable();
8889
await using var output = File.Create(path);
8990
await input.CopyToAsync(output);
@@ -153,7 +154,7 @@ private static Result<RootContainer> BuildContainerFromDirectory(string root)
153154
var files = Directory
154155
.EnumerateFiles(root, "*", SearchOption.AllDirectories)
155156
.ToDictionary(
156-
file => Path.GetRelativePath(root, file).Replace("\\", "/"),
157+
file => IOPath.GetRelativePath(root, file).Replace("\\", "/"),
157158
file => (IByteSource)ByteSource.FromAsyncStreamFactory(() => Task.FromResult<Stream>(File.OpenRead(file))),
158159
StringComparer.Ordinal);
159160

src/DotnetPackaging.Flatpak/DotnetPackaging.Flatpak.csproj

Lines changed: 1 addition & 1 deletion
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
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
</PropertyGroup>

src/DotnetPackaging.Msix/DotnetPackaging.Msix.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
</PropertyGroup>
88

99
<ItemGroup>
1010
<PackageReference Include="DeflateBlockCompressor" />
11-
<PackageReference Include="System.IO.Hashing" />
11+
<PackageReference Include="System.IO.Hashing" />
1212
</ItemGroup>
1313

1414
<ItemGroup>

0 commit comments

Comments
 (0)