Skip to content

Commit 0a59c24

Browse files
kimpenhausbuehler
andauthored
feat: add net10 support while retaining net9 and net8 compatibility (#995)
what changed - added `net10` target to project multi-targeting and adjusted conditional compilation where necessary - updated ci/workflow to build and test for `net10`, `net9`, and `net8` - preserved runtime behaviour and public apis for `net9` and `net8` - applied minor fixes and conditional code paths to address api differences introduced in `net10` compatibility & migration notes - multi-targeting preserves compatibility across `net8`, `net9`, and `net10` - no breaking api changes introduced by this pr - consumers targeting older frameworks should require no changes - if consumers rely on framework-specific behaviour, validate in your environment using `net10` --------- Co-authored-by: Christoph Bühler <buehler@users.noreply.github.com>
1 parent 4d43612 commit 0a59c24

File tree

6 files changed

+17
-11
lines changed

6 files changed

+17
-11
lines changed

src/KubeOps.Abstractions/KubeOps.Abstractions.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<ItemGroup>
1717
<PackageReference Include="JsonPatch.Net" Version="3.3.0" />
1818
<PackageReference Include="KubernetesClient" Version="18.0.5" />
19-
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.11"/>
19+
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="10.0.0" />
2020
<PackageReference Include="ZiggyCreatures.FusionCache" Version="2.4.0" />
2121
</ItemGroup>
2222

src/KubeOps.Operator.Web/KubeOps.Operator.Web.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

33
<PropertyGroup>
4-
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
4+
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<PropertyGroup>
@@ -29,4 +29,4 @@
2929
<PackageReference Include="Localtunnel" Version="2.0.0" NoWarn="NU5104" />
3030
</ItemGroup>
3131

32-
</Project>
32+
</Project>

src/KubeOps.Operator/KubeOps.Operator.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

33
<PropertyGroup>
4-
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
4+
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<PropertyGroup>
@@ -16,7 +16,7 @@
1616
</PropertyGroup>
1717

1818
<ItemGroup>
19-
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.11"/>
19+
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.0" />
2020
</ItemGroup>
2121

2222
<ItemGroup>

src/KubeOps.Transpiler/KubeOps.Transpiler.csproj

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

1717
<ItemGroup>
18-
<PackageReference Include="System.Reflection.MetadataLoadContext" Version="9.0.11" />
18+
<PackageReference Include="System.Reflection.MetadataLoadContext" Version="10.0.0" />
1919
</ItemGroup>
2020

2121
<ItemGroup>

test/Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<TargetFramework>net9.0</TargetFramework>
3+
<TargetFramework>net10.0</TargetFramework>
44
<ImplicitUsings>enable</ImplicitUsings>
55
<Nullable>enable</Nullable>
66
<IsPackable>false</IsPackable>
@@ -27,4 +27,4 @@
2727
<Using Include="Xunit"/>
2828
</ItemGroup>
2929

30-
</Project>
30+
</Project>
Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,29 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<ItemGroup>
33
<PackageReference Include="KubernetesClient" Version="18.0.5" />
4-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.11"/>
54
<PackageReference Include="Microsoft.Build.Locator" Version="1.10.12"/>
65
<PackageReference Include="Microsoft.CodeAnalysis" Version="4.14.0" />
76
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.14.0" />
87
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.14.0" />
98
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.14.0" />
109
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="4.14.0" />
1110
</ItemGroup>
11+
<ItemGroup Condition="'$(TargetFramework)'=='net8.0' Or '$(TargetFramework)'=='net9.0'">
12+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.11"/>
13+
</ItemGroup>
14+
<ItemGroup Condition="'$(TargetFramework)'=='net10.0'">
15+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.0" />
16+
</ItemGroup>
17+
1218
<ItemGroup>
1319
<ProjectReference Include="..\..\src\KubeOps.Operator.Web\KubeOps.Operator.Web.csproj"/>
1420
<ProjectReference Include="..\..\src\KubeOps.Transpiler\KubeOps.Transpiler.csproj"/>
1521
</ItemGroup>
1622
<ItemGroup>
1723
<FrameworkReference Include="Microsoft.AspNetCore.App"/>
1824
</ItemGroup>
19-
25+
2026
<PropertyGroup>
2127
<NoWarn>CS0618</NoWarn>
2228
</PropertyGroup>
23-
</Project>
29+
</Project>

0 commit comments

Comments
 (0)