Skip to content

Commit

Permalink
Update .NET 9.0 GA
Browse files Browse the repository at this point in the history
  • Loading branch information
thohng committed Nov 15, 2024
1 parent 6b9eb86 commit c0f8e81
Show file tree
Hide file tree
Showing 7 changed files with 108 additions and 68 deletions.
29 changes: 19 additions & 10 deletions .github/workflows/dotnet-core.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
name: .NET Core

on:
push:
branches: ["main", "dev*"]
tags: ["*.*.*"]
branches:
- main
- feature/**
- dev*
- dev/*
tags:
- "*.*.*"
pull_request:
branches: [main]

env:
DOTNET_NOLOGO: true

jobs:
build:
strategy:
fail-fast: false
matrix:
runs-on: [macos-11, ubuntu-22.04, windows-latest]
# runs-on: [macos-11, ubuntu-22.04, windows-latest]
runs-on: [ubuntu-22.04, windows-latest]
name: ${{ matrix.runs-on }}
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET 8.0.x, 7.0.x, 6.0.x, 5.0.x and 3.1.x
- name: Setup .NET 9.0.x, 8.0.x, 7.0.x, 6.0.x, 5.0.x and 3.1.x
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
Expand All @@ -28,11 +36,12 @@ jobs:
6.0.x
7.0.x
8.0.x
- name: Setup .NET 9.0.x Preview
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
dotnet-quality: 'preview'
9.0.x
# - name: Setup .NET 9.0.x Preview
# uses: actions/setup-dotnet@v4
# with:
# dotnet-version: 9.0.x
# dotnet-quality: 'preview'
- name: dotnet info
run: dotnet --info
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion Common.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<CurrentFrameworkVersion>6.0.28;7.0.17;8.0.3</CurrentFrameworkVersion>
<CurrentFrameworkVersion>6.0.36;8.0.11;9.0.0</CurrentFrameworkVersion>
<ImportedCommonProps>True</ImportedCommonProps>

<NET_ID>$([MSBuild]::GetTargetFrameworkIdentifier($(TargetFramework)))</NET_ID>
Expand Down
102 changes: 56 additions & 46 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

<PropertyGroup Condition="'$(FrameworkVersion)' == ''">
<FrameworkVersion Condition="'$(NET_3_1)' == true">3.1.*</FrameworkVersion>
<FrameworkVersion Condition="'$(NET_5_0)' == true">7.*</FrameworkVersion>
<FrameworkVersion Condition="'$(NET_6_0)' == true Or '$(NET_7_0)' == true Or '$(NET_8_0)' == true Or '$(NET_STD_2_X)' == true">8.*</FrameworkVersion>
<FrameworkVersion Condition="'$(NET_9_0_UP)' == true">9.*-*</FrameworkVersion>
<FrameworkVersion Condition="'$(NET_5_0)' == true Or '$(NET_STD_2_X)' == true">6.*</FrameworkVersion>
<FrameworkVersion Condition="'$(NET_6_0)' == true Or '$(NET_7_0)' == true">8.*</FrameworkVersion>
<FrameworkVersion Condition="'$(NET_8_0_UP)' == true">9.*</FrameworkVersion>
<FrameworkVersion Condition="'$(FrameworkVersion)' == ''">$(LatestDevFrameworkVersion)</FrameworkVersion>
</PropertyGroup>

Expand All @@ -22,7 +22,7 @@
<AspNetFrameworkVersion Condition="'$(NET_6_0)' == true">6.*</AspNetFrameworkVersion>
<AspNetFrameworkVersion Condition="'$(NET_7_0)' == true">7.*</AspNetFrameworkVersion>
<AspNetFrameworkVersion Condition="'$(NET_8_0)' == true">8.*</AspNetFrameworkVersion>
<AspNetFrameworkVersion Condition="'$(NET_9_0)' == true">9.*-*</AspNetFrameworkVersion>
<AspNetFrameworkVersion Condition="'$(NET_9_0)' == true">9.*</AspNetFrameworkVersion>
<AspNetFrameworkVersion Condition="'$(AspNetFrameworkVersion)' == ''">$(LatestDevFrameworkVersion)</AspNetFrameworkVersion>
</PropertyGroup>

Expand All @@ -31,20 +31,26 @@
<EFCoreFrameworkVersion Condition="'$(NET_5_0)' == true">5.*</EFCoreFrameworkVersion>
<EFCoreFrameworkVersion Condition="'$(NET_6_0)' == true Or '$(NET_7_0)' == true">7.*</EFCoreFrameworkVersion>
<EFCoreFrameworkVersion Condition="'$(NET_8_0)' == true">8.*</EFCoreFrameworkVersion>
<EFCoreFrameworkVersion Condition="'$(NET_9_0)' == true">9.*-*</EFCoreFrameworkVersion>
<EFCoreFrameworkVersion Condition="'$(NET_9_0)' == true">9.*</EFCoreFrameworkVersion>
<EFCoreFrameworkVersion Condition="'$(EFCoreFrameworkVersion)' == ''">$(LatestDevFrameworkVersion)</EFCoreFrameworkVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(NpgsqlEFCoreFrameworkVersion)' == ''">
<NpgsqlEFCoreFrameworkVersion Condition="'$(NpgsqlEFCoreFrameworkVersion)' == '' And '$(NET_9_0)' == true">9.*-*</NpgsqlEFCoreFrameworkVersion>
<NpgsqlEFCoreFrameworkVersion Condition="'$(NpgsqlEFCoreFrameworkVersion)' == ''">$(EFCoreFrameworkVersion)</NpgsqlEFCoreFrameworkVersion>
</PropertyGroup>

<PropertyGroup>
<NpgsqlVersion Condition="'$(NpgsqlVersion)' == '' And '$(NET_3_1_LESS_OR_STD)' == true">4.*</NpgsqlVersion>
<NpgsqlVersion Condition="'$(NpgsqlVersion)' == '' And '$(NET_9_0_UP)' == true">8.*</NpgsqlVersion>
<NpgsqlVersion Condition="'$(NpgsqlVersion)' == ''">$(EFCoreFrameworkVersion)</NpgsqlVersion>
<NuGetPackageVersion Condition="'$(NuGetPackageVersion)' == ''">6.*</NuGetPackageVersion>
<SystemTextJsonVersion Condition="'$(SystemTextJsonVersion)' == '' And '$(NET_5_0_LESS)' == true">8.*</SystemTextJsonVersion>
<SystemTextJsonVersion Condition="'$(SystemTextJsonVersion)' == '' And '$(NET_5_0_LESS)' == true">6.*</SystemTextJsonVersion>
<SystemTextJsonVersion Condition="'$(SystemTextJsonVersion)' == '' And ('$(NET_6_0)' == true Or '$(NET_7_0)' == true)">8.*</SystemTextJsonVersion>
<SystemTextJsonVersion Condition="'$(SystemTextJsonVersion)' == ''">$(FrameworkVersion)</SystemTextJsonVersion>
<!-- Swashbuckle.AspNetCore@6.3.2 reference to Microsoft.Extensions.ApiDescription.Server@6.0.5 by mistake -->
<SwashbuckleVersion Condition="'$(SwashbuckleVersion)' == '' And '$(NET_5_0_LESS)' == true">6.3.1</SwashbuckleVersion>
<SwashbuckleVersion Condition="'$(SwashbuckleVersion)' == '' And '$(NET_6_0_UP)' == true">6.5.*</SwashbuckleVersion>
<!--<SwashbuckleVersion Condition="'$(SwashbuckleVersion)' == '' And '$(NET_6_0_UP)' == true">6.7.*</SwashbuckleVersion>-->
<SwashbuckleVersion Condition="'$(SwashbuckleVersion)' == ''">6.*</SwashbuckleVersion>
</PropertyGroup>

Expand All @@ -59,6 +65,7 @@

<!--the helpers -->
<PackageReference Update="NetLah.Abstractions" Version="1.*" />
<PackageReference Update="NetLah.Extensions.ClockProvider" Version="1.*" />
<PackageReference Update="NetLah.Extensions.CommandLineUtils" Version="0.*-*" />
<PackageReference Update="NetLah.Extensions.Configuration" Version="1.*-*" />
<PackageReference Update="NetLah.Extensions.EventAggregator" Version="1.*-*" />
Expand All @@ -79,27 +86,29 @@
<PackageReference Update="NUnit3TestAdapter" Version="4.*" PrivateAssets="All" />
<PackageReference Update="TeamCity.VSTest.TestAdapter" Version="1.*" />
<PackageReference Update="xunit" Version="2.*" />
<PackageReference Update="xunit.extensibility.core" Version="2.*" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.*" PrivateAssets="All" />

<!--serilog-->
<PackageReference Update="Serilog" Version="3.*" />
<PackageReference Update="Serilog" Version="4.*" />
<PackageReference Update="Serilog.AspNetCore" Version="8.*" />
<PackageReference Update="Serilog.Enrichers.CorrelationId" Version="3.*" />
<PackageReference Update="Serilog.Enrichers.Environment" Version="2.*" />
<PackageReference Update="Serilog.Enrichers.Thread" Version="3.*" />
<PackageReference Update="Serilog.Enrichers.Environment" Version="3.*" />
<PackageReference Update="Serilog.Enrichers.Thread" Version="4.*" />
<PackageReference Update="Serilog.Extensions.Hosting" Version="8.*" />
<PackageReference Update="Serilog.Extensions.Logging" Version="8.*" />
<PackageReference Update="Serilog.Formatting.Compact" Version="2.*" />
<PackageReference Update="Serilog.Formatting.Compact" Version="3.*" />
<PackageReference Update="Serilog.Settings.Configuration" Version="8.*" />
<PackageReference Update="Serilog.Sinks.AzureAnalytics" Version="5.*" />
<PackageReference Update="Serilog.Sinks.Console" Version="5.*" />
<PackageReference Update="Serilog.Sinks.Debug" Version="2.*" />
<PackageReference Update="Serilog.Sinks.File" Version="5.*" />
<PackageReference Update="Serilog.Sinks.PeriodicBatching" Version="4.*" />
<PackageReference Update="Serilog.Sinks.Seq" Version="7.*" />
<!--<PackageReference Update="Serilog.Sinks.AzureAnalytics" Version="5.*" />-->
<PackageReference Update="Serilog.Sinks.Console" Version="6.*" />
<PackageReference Update="Serilog.Sinks.Debug" Version="3.*" />
<PackageReference Update="Serilog.Sinks.File" Version="6.*" />
<PackageReference Update="Serilog.Sinks.PeriodicBatching" Version="5.*" />
<PackageReference Update="Serilog.Sinks.Seq" Version="8.*" />

<!--misc-->
<PackageReference Update="AutoMapper" Version="13.*" />
<PackageReference Update="AutoMapper" Version="13.*" Condition="'$(NET_6_0_UP)' == true" />
<PackageReference Update="AutoMapper" Version="12.*" Condition="'$(NET_5_0_LESS)' == true" />
<PackageReference Update="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.*" />
<PackageReference Update="BouncyCastle.NetCore" Version="1.9.*" />
<PackageReference Update="ClosedXML" Version="0.95.*" />
Expand Down Expand Up @@ -135,7 +144,7 @@
<PackageReference Update="SkiaSharp.QrCode" Version="0.6.0" />
<PackageReference Update="Spire.Doc" Version="11.*" />
<PackageReference Update="StackExchange.Redis" Version="2.*" />
<PackageReference Update="Std.UriTemplate" Version="0.*" />
<PackageReference Update="Std.UriTemplate" Version="2.*" />
<PackageReference Update="Tavis.UriTemplates" Version="2.*" />
<PackageReference Update="TimeZoneConverter" Version="5.*" />
<PackageReference Update="YamlDotNet" Version="11.*" />
Expand All @@ -156,13 +165,13 @@
<PackageReference Update="Microsoft.VisualStudio.Debugger.Contracts" Version="17.*" />
<PackageReference Update="Microsoft.VisualStudio.Threading" Version="17.*" />
<PackageReference Update="Microsoft.VisualStudio.Validation" Version="17.*" />
<PackageReference Update="System.ClientModel" Version="1.*" />
<PackageReference Update="System.ClientModel" Version="1.*" />
<PackageReference Update="System.CommandLine" Version="2.*-*" />
<PackageReference Update="System.Memory" Version="4.5.4" />
<PackageReference Update="System.Runtime.Loader" Version="4.3.0" />
<PackageReference Update="System.Runtime.Extensions" Version="4.3.1" />
<PackageReference Update="System.Security.Principal.Windows" Version="5.*" />
<PackageReference Update="Yarp.ReverseProxy" Version="(1.*,2)" />
<PackageReference Update="Yarp.ReverseProxy" Version="[2.*,3)" />

<!--microsoft CodeAnalysis-->
<PackageReference Update="Microsoft.CodeAnalysis" Version="4.*" />
Expand Down Expand Up @@ -221,7 +230,7 @@
<PackageReference Update="Microsoft.Extensions.ObjectPool" Version="$(FrameworkVersion)" />
<PackageReference Update="Microsoft.Extensions.Primitives" Version="$(FrameworkVersion)" />
<PackageReference Update="Microsoft.Win32.SystemEvents" Version="$(FrameworkVersion)" />

<PackageReference Update="System.Collections.Immutable" Version="$(FrameworkVersion)" />
<PackageReference Update="System.Composition.AttributedModel" Version="$(FrameworkVersion)" />
<PackageReference Update="System.Composition.Convention" Version="$(FrameworkVersion)" />
Expand Down Expand Up @@ -300,8 +309,9 @@

<!-- EFCore.PG and Npgsql must same version https://github.com/npgsql/efcore.pg/issues/3011 -->
<PackageReference Update="Npgsql" Version="$(NpgsqlVersion)" />
<PackageReference Update="Npgsql.EntityFrameworkCore.PostgreSQL" Version="$(EFCoreFrameworkVersion)" />
<PackageReference Update="Npgsql.EntityFrameworkCore.PostgreSQL" Version="$(NpgsqlEFCoreFrameworkVersion)" />
<PackageReference Update="EFCore.NamingConventions" Version="$(EFCoreFrameworkVersion)" />
<PackageReference Update="Tec.EFCore.NamingConventions" Version="9.0.0-*" />

<!--identityserver4 -->
<PackageReference Update="IdentityModel" Version="7.*" />
Expand Down Expand Up @@ -337,32 +347,32 @@
<!--microsoft identity-->
<PackageReference Update="Microsoft.Graph" Version="5.*" />
<PackageReference Update="Microsoft.Graph.Core" Version="3.*" />
<PackageReference Update="Microsoft.Identity.Abstractions" Version="5.*" />
<PackageReference Update="Microsoft.Identity.Abstractions" Version="7.*" />
<PackageReference Update="Microsoft.Identity.Client" Version="4.*" />
<PackageReference Update="Microsoft.Identity.Client.Extensions.Msal" Version="4.*" />
<PackageReference Update="Microsoft.Identity.Web" Version="2.*" />
<PackageReference Update="Microsoft.Identity.Web.Certificate" Version="2.*" />
<PackageReference Update="Microsoft.Identity.Web.Certificateless" Version="2.*" />
<PackageReference Update="Microsoft.Identity.Web.Diagnostics" Version="2.*" />
<PackageReference Update="Microsoft.Identity.Web.DownstreamApi" Version="2.*" />
<PackageReference Update="Microsoft.Identity.Web.TokenAcquisition" Version="2.*" />
<PackageReference Update="Microsoft.Identity.Web.TokenCache" Version="2.*" />
<PackageReference Update="Microsoft.Identity.Web.MicrosoftGraph" Version="2.*" />
<PackageReference Update="Microsoft.IdentityModel.Abstractions" Version="7.*" />
<PackageReference Update="Microsoft.IdentityModel.JsonWebTokens" Version="7.*" />
<PackageReference Update="Microsoft.IdentityModel.Logging" Version="7.*" />
<PackageReference Update="Microsoft.IdentityModel.LoggingExtensions" Version="7.*" />
<PackageReference Update="Microsoft.IdentityModel.Protocols" Version="7.*" />
<PackageReference Update="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="7.*" />
<PackageReference Update="Microsoft.IdentityModel.Tokens" Version="7.*" />
<PackageReference Update="Microsoft.IdentityModel.Validators" Version="7.*" />
<PackageReference Update="Microsoft.Identity.Web" Version="3.*" />
<PackageReference Update="Microsoft.Identity.Web.Certificate" Version="3.*" />
<PackageReference Update="Microsoft.Identity.Web.Certificateless" Version="3.*" />
<PackageReference Update="Microsoft.Identity.Web.Diagnostics" Version="3.*" />
<PackageReference Update="Microsoft.Identity.Web.DownstreamApi" Version="3.*" />
<PackageReference Update="Microsoft.Identity.Web.TokenAcquisition" Version="3.*" />
<PackageReference Update="Microsoft.Identity.Web.TokenCache" Version="3.*" />
<PackageReference Update="Microsoft.Identity.Web.MicrosoftGraph" Version="3.*" />
<PackageReference Update="Microsoft.IdentityModel.Abstractions" Version="8.*" />
<PackageReference Update="Microsoft.IdentityModel.JsonWebTokens" Version="8.*" />
<PackageReference Update="Microsoft.IdentityModel.Logging" Version="8.*" />
<PackageReference Update="Microsoft.IdentityModel.LoggingExtensions" Version="8.*" />
<PackageReference Update="Microsoft.IdentityModel.Protocols" Version="8.*" />
<PackageReference Update="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="8.*" />
<PackageReference Update="Microsoft.IdentityModel.Tokens" Version="8.*" />
<PackageReference Update="Microsoft.IdentityModel.Validators" Version="8.*" />
<PackageReference Update="Microsoft.Kiota.Abstractions" Version="1.*" />
<PackageReference Update="Microsoft.Kiota.Authentication.Azure" Version="1.*" />
<PackageReference Update="Microsoft.Kiota.Http.HttpClientLibrary" Version="1.*" />
<PackageReference Update="Microsoft.Kiota.Serialization.Form" Version="1.*" />
<PackageReference Update="Microsoft.Kiota.Serialization.Json" Version="1.*" />
<PackageReference Update="Microsoft.Kiota.Serialization.Text" Version="1.*" />
<PackageReference Update="System.IdentityModel.Tokens.Jwt" Version="7.*" />
<PackageReference Update="System.IdentityModel.Tokens.Jwt" Version="8.*" />

<!--nuget-->
<PackageReference Update="NuGet.Common" Version="$(NuGetPackageVersion)" />
Expand Down Expand Up @@ -430,18 +440,18 @@

<ItemGroup Condition="'$(NET_5_0)' == true">
<PackageReference Update="Serilog" Version="3.0.*" />
<PackageReference Update="Serilog.AspNetCore" Version="7.*" />
<PackageReference Update="Serilog.Extensions.Hosting" Version="7.*" />
<PackageReference Update="Serilog.Extensions.Logging" Version="7.*" />
<PackageReference Update="Serilog.AspNetCore" Version="6.*" />
<PackageReference Update="Serilog.Extensions.Hosting" Version="5.*" />
<PackageReference Update="Serilog.Extensions.Logging" Version="3.*" />
<PackageReference Update="Serilog.Formatting.Compact" Version="1.*" />
<PackageReference Update="Serilog.Settings.Configuration" Version="7.*" />
<PackageReference Update="Serilog.Settings.Configuration" Version="3.*" />
<PackageReference Update="Serilog.Sinks.Console" Version="4.*" />
<PackageReference Update="Serilog.Sinks.Debug" Version="2.*" />
<PackageReference Update="Serilog.Sinks.File" Version="5.*" />
<PackageReference Update="Serilog.Sinks.PeriodicBatching" Version="3.*" />
<PackageReference Update="Serilog.Sinks.Seq" Version="5.*" />
</ItemGroup>

<ItemGroup Condition="'$(NET_5_0_LESS_OR_STD)' == true">
<PackageReference Update="xunit.runner.visualstudio" Version="2.4.*" PrivateAssets="All" />
</ItemGroup>
Expand Down
5 changes: 5 additions & 0 deletions samples/ConsoleApp/ConsoleApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,9 @@
<ProjectReference Include="..\..\src\NetLah.Extensions.Configuration\NetLah.Extensions.Configuration.csproj" />
</ItemGroup>

<ItemGroup>
<!-- System.Drawing.Common 4.7.0 -->
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-rxg9-xrhp-64gj" />
</ItemGroup>

</Project>
Loading

0 comments on commit c0f8e81

Please sign in to comment.