Skip to content

Commit 38223bb

Browse files
committed
Add .NET 9.0
1 parent a13aaf9 commit 38223bb

File tree

7 files changed

+58
-26
lines changed

7 files changed

+58
-26
lines changed

.azure/pipelines/azure-pipelines.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ pool:
3131
vmImage: $(imageName)
3232

3333
steps:
34+
- task: UseDotNet@2
35+
displayName: "Use .NET Core sdk 9.x"
36+
inputs:
37+
version: 9.x
38+
includePreviewVersions: true
39+
3440
- task: UseDotNet@2
3541
displayName: "Use .NET Core sdk 8.x"
3642
inputs:

.github/workflows/dotnet-core.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: .NET Core
22

33
on:
44
push:
5-
branches: [main]
5+
branches: ["main", "dev*"]
66
tags: ["*.*.*"]
77
pull_request:
88
branches: [main]
@@ -16,18 +16,23 @@ jobs:
1616
name: ${{ matrix.runs-on }}
1717
runs-on: ${{ matrix.runs-on }}
1818
steps:
19-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
2020
with:
2121
fetch-depth: 0
22-
- name: Setup .NET Core 8.0.x, 7.0.x, 6.0.x , 5.0.x and 3.1.x
23-
uses: actions/setup-dotnet@v3
22+
- name: Setup .NET 8.0.x, 7.0.x, 6.0.x, 5.0.x and 3.1.x
23+
uses: actions/setup-dotnet@v4
2424
with:
2525
dotnet-version: |
2626
3.1.x
2727
5.0.x
2828
6.0.x
2929
7.0.x
3030
8.0.x
31+
- name: Setup .NET 9.0.x Preview
32+
uses: actions/setup-dotnet@v4
33+
with:
34+
dotnet-version: 9.0.x
35+
dotnet-quality: 'preview'
3136
- name: dotnet info
3237
run: dotnet --info
3338
- name: Install dependencies

Common.props

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22

33
<PropertyGroup>
4-
<CurrentFrameworkVersion>6.0.26;7.0.15;8.0.1</CurrentFrameworkVersion>
4+
<CurrentFrameworkVersion>6.0.28;7.0.17;8.0.3</CurrentFrameworkVersion>
55
<ImportedCommonProps>True</ImportedCommonProps>
66

77
<NET_ID>$([MSBuild]::GetTargetFrameworkIdentifier($(TargetFramework)))</NET_ID>
@@ -31,38 +31,54 @@
3131
<NET_10_0 Condition="'$(NET_VER)' == '10.0' And '$(NET_ID)' == '.NETCoreApp'">True</NET_10_0>
3232

3333
<NET_3_1_LESS>False</NET_3_1_LESS>
34+
<NET_3_1_UP>False</NET_3_1_UP>
3435
<NET_5_0_LESS>False</NET_5_0_LESS>
36+
<NET_5_0_UP>False</NET_5_0_UP>
3537
<NET_6_0_LESS>False</NET_6_0_LESS>
3638
<NET_6_0_UP>False</NET_6_0_UP>
3739
<NET_7_0_LESS>False</NET_7_0_LESS>
3840
<NET_7_0_UP>False</NET_7_0_UP>
3941
<NET_8_0_LESS>False</NET_8_0_LESS>
4042
<NET_8_0_UP>False</NET_8_0_UP>
43+
<NET_9_0_LESS>False</NET_9_0_LESS>
44+
<NET_9_0_UP>False</NET_9_0_UP>
4145
<NET_3_1_LESS Condition="'$(NET_VER)' &lt;= '3.1' And '$(NET_ID)' == '.NETCoreApp'">True</NET_3_1_LESS>
46+
<NET_3_1_UP Condition="'$(NET_VER)' &gt;= '3.1' And '$(NET_ID)' == '.NETCoreApp'">True</NET_3_1_UP>
4247
<NET_5_0_LESS Condition="'$(NET_VER)' &lt; '6.0' And '$(NET_ID)' == '.NETCoreApp'">True</NET_5_0_LESS>
48+
<NET_5_0_UP Condition="'$(NET_VER)' &gt;= '5.0' And '$(NET_ID)' == '.NETCoreApp'">True</NET_5_0_UP>
4349
<NET_6_0_LESS Condition="'$(NET_VER)' &lt; '7.0' And '$(NET_ID)' == '.NETCoreApp'">True</NET_6_0_LESS>
4450
<NET_6_0_UP Condition="'$(NET_VER)' &gt;= '6.0' And '$(NET_ID)' == '.NETCoreApp'">True</NET_6_0_UP>
4551
<NET_7_0_LESS Condition="'$(NET_VER)' &lt; '8.0' And '$(NET_ID)' == '.NETCoreApp'">True</NET_7_0_LESS>
4652
<NET_7_0_UP Condition="'$(NET_VER)' &gt;= '7.0' And '$(NET_ID)' == '.NETCoreApp'">True</NET_7_0_UP>
4753
<NET_8_0_LESS Condition="'$(NET_VER)' &lt;= '8.0' And '$(NET_ID)' == '.NETCoreApp'">True</NET_8_0_LESS>
4854
<NET_8_0_UP Condition="'$(NET_VER)' &gt;= '8.0' And '$(NET_ID)' == '.NETCoreApp'">True</NET_8_0_UP>
49-
55+
<NET_9_0_LESS Condition="'$(NET_VER)' &lt;= '9.0' And '$(NET_ID)' == '.NETCoreApp'">True</NET_9_0_LESS>
56+
<NET_9_0_UP Condition="'$(NET_VER)' &gt;= '9.0' And '$(NET_ID)' == '.NETCoreApp'">True</NET_9_0_UP>
57+
5058
<NET_3_1_LESS_OR_STD>False</NET_3_1_LESS_OR_STD>
59+
<NET_3_1_UP_OR_STD>False</NET_3_1_UP_OR_STD>
5160
<NET_5_0_LESS_OR_STD>False</NET_5_0_LESS_OR_STD>
61+
<NET_5_0_UP_OR_STD>False</NET_5_0_UP_OR_STD>
5262
<NET_6_0_LESS_OR_STD>False</NET_6_0_LESS_OR_STD>
5363
<NET_6_0_UP_OR_STD>False</NET_6_0_UP_OR_STD>
5464
<NET_7_0_LESS_OR_STD>False</NET_7_0_LESS_OR_STD>
5565
<NET_7_0_UP_OR_STD>False</NET_7_0_UP_OR_STD>
5666
<NET_8_0_LESS_OR_STD>False</NET_8_0_LESS_OR_STD>
5767
<NET_8_0_UP_OR_STD>False</NET_8_0_UP_OR_STD>
68+
<NET_9_0_LESS_OR_STD>False</NET_9_0_LESS_OR_STD>
69+
<NET_9_0_UP_OR_STD>False</NET_9_0_UP_OR_STD>
5870
<NET_3_1_LESS_OR_STD Condition="'$(NET_3_1_LESS)' == true Or '$(NET_STD_2_X)' == true">True</NET_3_1_LESS_OR_STD>
71+
<NET_3_1_UP_OR_STD Condition="'$(NET_3_1_UP)' == true Or '$(NET_STD_2_X)' == true">True</NET_3_1_UP_OR_STD>
5972
<NET_5_0_LESS_OR_STD Condition="'$(NET_5_0_LESS)' == true Or '$(NET_STD_2_X)' == true">True</NET_5_0_LESS_OR_STD>
73+
<NET_5_0_UP_OR_STD Condition="'$(NET_5_0_UP)' == true Or '$(NET_STD_2_X)' == true">True</NET_5_0_UP_OR_STD>
6074
<NET_6_0_LESS_OR_STD Condition="'$(NET_6_0_LESS)' == true Or '$(NET_STD_2_X)' == true">True</NET_6_0_LESS_OR_STD>
6175
<NET_6_0_UP_OR_STD Condition="'$(NET_6_0_UP)' == true Or '$(NET_STD_2_X)' == true">True</NET_6_0_UP_OR_STD>
6276
<NET_7_0_LESS_OR_STD Condition="'$(NET_7_0_LESS)' == true Or '$(NET_STD_2_X)' == true">True</NET_7_0_LESS_OR_STD>
6377
<NET_7_0_UP_OR_STD Condition="'$(NET_7_0_UP)' == true Or '$(NET_STD_2_X)' == true">True</NET_7_0_UP_OR_STD>
6478
<NET_8_0_LESS_OR_STD Condition="'$(NET_8_0_LESS)' == true Or '$(NET_STD_2_X)' == true">True</NET_8_0_LESS_OR_STD>
6579
<NET_8_0_UP_OR_STD Condition="'$(NET_8_0_UP)' == true Or '$(NET_STD_2_X)' == true">True</NET_8_0_UP_OR_STD>
80+
<NET_9_0_LESS_OR_STD Condition="'$(NET_9_0_LESS)' == true Or '$(NET_STD_2_X)' == true">True</NET_9_0_LESS_OR_STD>
81+
<NET_9_0_UP_OR_STD Condition="'$(NET_9_0_UP)' == true Or '$(NET_STD_2_X)' == true">True</NET_9_0_UP_OR_STD>
6682

6783
</PropertyGroup>
6884

Directory.Build.targets

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
<Import Project="$(MSBuildThisFileDirectory)Directory.Build.initial.targets" Condition="Exists('$(MSBuildThisFileDirectory)Directory.Build.initial.targets')" />
66

77
<PropertyGroup Condition="'$(LatestDevFrameworkVersion)' == ''">
8-
<LatestDevFrameworkVersion>9.*-*</LatestDevFrameworkVersion>
8+
<LatestDevFrameworkVersion>10.*-*</LatestDevFrameworkVersion>
99
</PropertyGroup>
1010

1111
<PropertyGroup Condition="'$(FrameworkVersion)' == ''">
12-
<FrameworkVersion Condition="'$(NET_3_1)' == true">3.*</FrameworkVersion>
13-
<FrameworkVersion Condition="'$(NET_5_0)' == true">5.*</FrameworkVersion>
14-
<FrameworkVersion Condition="'$(NET_6_0_UP_OR_STD)' == true">8.*</FrameworkVersion>
12+
<FrameworkVersion Condition="'$(NET_5_0_LESS)' == true">7.*</FrameworkVersion>
13+
<FrameworkVersion Condition="'$(NET_6_0)' == true Or '$(NET_7_0)' == true Or '$(NET_8_0)' == true Or '$(NET_STD_2_X)' == true">8.*</FrameworkVersion>
14+
<FrameworkVersion Condition="'$(NET_9_0_UP)' == true">9.*-*</FrameworkVersion>
1515
<FrameworkVersion Condition="'$(FrameworkVersion)' == ''">$(LatestDevFrameworkVersion)</FrameworkVersion>
1616
</PropertyGroup>
1717

@@ -21,20 +21,23 @@
2121
<AspNetFrameworkVersion Condition="'$(NET_6_0)' == true">6.*</AspNetFrameworkVersion>
2222
<AspNetFrameworkVersion Condition="'$(NET_7_0)' == true">7.*</AspNetFrameworkVersion>
2323
<AspNetFrameworkVersion Condition="'$(NET_8_0)' == true">8.*</AspNetFrameworkVersion>
24+
<AspNetFrameworkVersion Condition="'$(NET_9_0)' == true">9.*-*</AspNetFrameworkVersion>
2425
<AspNetFrameworkVersion Condition="'$(AspNetFrameworkVersion)' == ''">$(LatestDevFrameworkVersion)</AspNetFrameworkVersion>
2526
</PropertyGroup>
2627

2728
<PropertyGroup Condition="'$(EFCoreFrameworkVersion)' == ''">
2829
<EFCoreFrameworkVersion Condition="'$(NET_5_0_LESS_OR_STD)' == true">5.*</EFCoreFrameworkVersion>
2930
<EFCoreFrameworkVersion Condition="'$(NET_6_0)' == true Or '$(NET_7_0)' == true">7.*</EFCoreFrameworkVersion>
3031
<EFCoreFrameworkVersion Condition="'$(NET_8_0)' == true">8.*</EFCoreFrameworkVersion>
32+
<EFCoreFrameworkVersion Condition="'$(NET_9_0)' == true">9.*-*</EFCoreFrameworkVersion>
3133
<EFCoreFrameworkVersion Condition="'$(EFCoreFrameworkVersion)' == ''">$(LatestDevFrameworkVersion)</EFCoreFrameworkVersion>
3234
</PropertyGroup>
3335

3436
<PropertyGroup>
3537
<SystemTextJsonVersion Condition="'$(SystemTextJsonVersion)' == '' And '$(NET_5_0_LESS)' == true">8.*</SystemTextJsonVersion>
3638
<SystemTextJsonVersion Condition="'$(SystemTextJsonVersion)' == ''">$(FrameworkVersion)</SystemTextJsonVersion>
37-
<SwashbuckleVersion Condition="'$(SwashbuckleVersion)' == '' And '$(NET_5_0_LESS)' == true">6.3.*</SwashbuckleVersion>
39+
<!-- Swashbuckle.AspNetCore@6.3.2 reference to Microsoft.Extensions.ApiDescription.Server@6.0.5 by mistake -->
40+
<SwashbuckleVersion Condition="'$(SwashbuckleVersion)' == '' And '$(NET_5_0_LESS)' == true">6.3.1</SwashbuckleVersion>
3841
<SwashbuckleVersion Condition="'$(SwashbuckleVersion)' == '' And '$(NET_6_0)' == true">6.4.*</SwashbuckleVersion>
3942
<SwashbuckleVersion Condition="'$(SwashbuckleVersion)' == ''">6.*</SwashbuckleVersion>
4043
</PropertyGroup>
@@ -52,7 +55,7 @@
5255
<PackageReference Update="NetLah.Abstractions" Version="1.*" />
5356
<PackageReference Update="NetLah.Extensions.CommandLineUtils" Version="0.*-*" />
5457
<PackageReference Update="NetLah.Extensions.Configuration" Version="1.*-*" />
55-
<PackageReference Update="NetLah.Extensions.EventAggregator" Version="0.*-*" />
58+
<PackageReference Update="NetLah.Extensions.EventAggregator" Version="1.*-*" />
5659
<PackageReference Update="NetLah.Extensions.HttpOverrides" Version="1.*-*" />
5760
<PackageReference Update="NetLah.Extensions.Logging.Reference" Version="1.*-*" />
5861
<PackageReference Update="NetLah.Extensions.Logging.Serilog" Version="1.*-*" />
@@ -86,8 +89,8 @@
8689
<PackageReference Update="Serilog.Sinks.Console" Version="5.*" />
8790
<PackageReference Update="Serilog.Sinks.Debug" Version="2.*" />
8891
<PackageReference Update="Serilog.Sinks.File" Version="5.*" />
89-
<PackageReference Update="Serilog.Sinks.PeriodicBatching" Version="3.*" />
90-
<PackageReference Update="Serilog.Sinks.Seq" Version="6.*" />
92+
<PackageReference Update="Serilog.Sinks.PeriodicBatching" Version="4.*" />
93+
<PackageReference Update="Serilog.Sinks.Seq" Version="7.*" />
9194

9295
<!--misc-->
9396
<PackageReference Update="AutoMapper" Version="12.*" />
@@ -271,8 +274,9 @@
271274
<PackageReference Update="Microsoft.EntityFrameworkCore.SqlServer" Version="$(EFCoreFrameworkVersion)" />
272275
<PackageReference Update="Microsoft.EntityFrameworkCore.Tools" Version="$(EFCoreFrameworkVersion)" PrivateAssets="All" />
273276
<PackageReference Update="Microsoft.SqlServer.Server" Version="1.*" />
277+
278+
<!-- EFCore.PG and Npgsql must same version https://github.com/npgsql/efcore.pg/issues/3011 -->
274279
<PackageReference Update="Npgsql" Version="$(EFCoreFrameworkVersion)" />
275-
<PackageReference Update="Npgsql" Version="8.*" Condition="'$(NET_6_0)' == true Or '$(NET_7_0)' == true" />
276280
<PackageReference Update="Npgsql.EntityFrameworkCore.PostgreSQL" Version="$(EFCoreFrameworkVersion)" />
277281
<PackageReference Update="EFCore.NamingConventions" Version="$(EFCoreFrameworkVersion)" />
278282

@@ -387,7 +391,7 @@
387391

388392
</ItemGroup>
389393

390-
<ItemGroup Condition="'$(NET_5_0_LESS)' == true">
394+
<ItemGroup Condition="'$(NET_5_0_LESS_OR_STD)' == true">
391395
<PackageReference Update="Serilog" Version="3.0.*" />
392396
<PackageReference Update="Serilog.AspNetCore" Version="7.*" />
393397
<PackageReference Update="Serilog.Extensions.Hosting" Version="7.*" />

NetLah.Extensions.EventAggregator.Test/NetLah.Extensions.EventAggregator.Test.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-
<TargetFrameworks>net8.0;net7.0;net6.0;net5.0;netcoreapp3.1</TargetFrameworks>
4+
<TargetFrameworks>net9.0;net8.0;net7.0;net6.0;net5.0;netcoreapp3.1</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
<SignAssembly>true</SignAssembly>
77
<AssemblyOriginatorKeyFile>../NetLah.snk</AssemblyOriginatorKeyFile>

NetLah.Extensions.EventAggregator/Directory.Build.targets

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<Project>
22

3-
<Import Project="$([MSBuild]::GetPathOfFileAbove('Common.props', '$(MSBuildThisFileDirectory)'))" />
3+
<Import Project="$([MSBuild]::GetPathOfFileAbove('Common.props', '$(MSBuildThisFileDirectory)'))" Condition="'$(ImportedCommonProps)' == ''" />
44

55
<Import Project="$(MSBuildThisFileDirectory)Directory.Build.initial.targets" Condition="Exists('$(MSBuildThisFileDirectory)Directory.Build.initial.targets')" />
66

77
<PropertyGroup Condition="'$(LatestDevFrameworkVersion)' == ''">
8-
<LatestDevFrameworkVersion>9.*-*</LatestDevFrameworkVersion>
8+
<LatestDevFrameworkVersion>9.0.0-preview.1.*</LatestDevFrameworkVersion>
99
</PropertyGroup>
1010

1111
<PropertyGroup Condition="'$(FrameworkVersion)' == ''">
@@ -14,6 +14,7 @@
1414
<FrameworkVersion Condition="'$(NET_6_0)' == true">6.0.0</FrameworkVersion>
1515
<FrameworkVersion Condition="'$(NET_7_0)' == true">7.0.0</FrameworkVersion>
1616
<FrameworkVersion Condition="'$(NET_8_0)' == true">8.0.0</FrameworkVersion>
17+
<FrameworkVersion Condition="'$(NET_9_0)' == true">9.0.0-preview.1.*</FrameworkVersion>
1718
<FrameworkVersion Condition="'$(FrameworkVersion)' == ''">$(LatestDevFrameworkVersion)</FrameworkVersion>
1819
</PropertyGroup>
1920

@@ -36,12 +37,12 @@
3637
<!--the helpers -->
3738
<PackageReference Update="NetLah.Abstractions" Version="1.0.0" />
3839
<PackageReference Update="NetLah.Extensions.CommandLineUtils" Version="0.1.0-a1.2" />
39-
<PackageReference Update="NetLah.Extensions.Configuration" Version="1.0.0-rc1" />
40-
<PackageReference Update="NetLah.Extensions.EventAggregator" Version="0.2.1" />
40+
<PackageReference Update="NetLah.Extensions.Configuration" Version="1.0.0-rc2" />
41+
<PackageReference Update="NetLah.Extensions.EventAggregator" Version="1.0.0-rc1" />
4142
<PackageReference Update="NetLah.Extensions.HttpOverrides" Version="1.0.0-rc1" />
42-
<PackageReference Update="NetLah.Extensions.Logging.Reference" Version="1.0.0-rc1" />
43-
<PackageReference Update="NetLah.Extensions.Logging.Serilog" Version="1.0.0-rc1" />
44-
<PackageReference Update="NetLah.Extensions.Logging.Serilog.AspNetCore" Version="1.0.0-rc1" />
43+
<PackageReference Update="NetLah.Extensions.Logging.Reference" Version="1.0.0-rc2" />
44+
<PackageReference Update="NetLah.Extensions.Logging.Serilog" Version="1.0.0-rc2" />
45+
<PackageReference Update="NetLah.Extensions.Logging.Serilog.AspNetCore" Version="1.0.0-rc2" />
4546
<PackageReference Update="NetLah.Extensions.SpaServices.Hosting" Version="1.0.0-rc1" />
4647
<PackageReference Update="Testing.Dynamic.Json" Version="1.0.0-rc3" />
4748

@@ -95,7 +96,7 @@
9596
<!--microsoft identity-->
9697
<PackageReference Update="Microsoft.Graph.Core" Version="3.0.0" />
9798
<PackageReference Update="Microsoft.Identity.Client.Extensions.Msal" Version="2.31.0" />
98-
<PackageReference Update="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="7.0.3" />
99+
<PackageReference Update="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="7.1.2" />
99100

100101
<!--open api-->
101102
<PackageReference Update="Microsoft.OpenApi" Version="1.0.0" />

samples/SampleWebApi/SampleWebApi.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.Web">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net8.0;net7.0;net6.0;net5.0;netcoreapp3.1</TargetFrameworks>
4+
<TargetFrameworks>net9.0;net8.0;net7.0;net6.0;net5.0;netcoreapp3.1</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
<CheckEolTargetFramework>false</CheckEolTargetFramework>
77
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>

0 commit comments

Comments
 (0)