Skip to content

Commit

Permalink
chore(net9): update version to net9
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil91 committed Feb 6, 2025
1 parent 92b07d0 commit 68aab4a
Show file tree
Hide file tree
Showing 14 changed files with 46 additions and 43 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ jobs:
fail-fast: false
matrix:
language: ["csharp"]
dotnet-version: [ '9.0' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
Expand All @@ -71,6 +72,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@3951f0dfe7a07e2313ec93c75700083e2005cbab # v4.3.0
with:
dotnet-version: ${{ matrix.dotnet-version }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v2.227
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
# change to preview .NET 9 until fix for https://github.com/NuGet/Home/issues/12954 gets released for .NET 8
dotnet-version: ['9.0']

steps:
Expand All @@ -47,8 +46,6 @@ jobs:
uses: actions/setup-dotnet@3951f0dfe7a07e2313ec93c75700083e2005cbab # v4.3.0
with:
dotnet-version: ${{ matrix.dotnet-version }}
# change to preview .NET 9 until fix for https://github.com/NuGet/Home/issues/12954 gets released for .NET 8
dotnet-quality: 'preview'

- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ To see the latest open API specs you can have a look at the [API Hub](https://ec

## How to build and run

Install the [.NET 8.0 SDK](https://www.microsoft.com/net/download).
Install the [.NET 9.0 SDK](https://www.microsoft.com/net/download).

Run the following command from the CLI:

Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile-policy-hub-migrations
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
# SPDX-License-Identifier: Apache-2.0
###############################################################

FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS publish
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS publish
ARG TARGETARCH
WORKDIR /
COPY LICENSE NOTICE.md DEPENDENCIES /
COPY /src/database /src/database
WORKDIR /src/database/PolicyHub.Migrations
RUN dotnet publish "PolicyHub.Migrations.csproj" -c Release -o /migrations/publish

FROM mcr.microsoft.com/dotnet/runtime:8.0-alpine
FROM mcr.microsoft.com/dotnet/runtime:9.0-alpine
ENV COMPlus_EnableDiagnostics=0
WORKDIR /migrations
COPY --from=publish /migrations/publish .
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile-policy-hub-service
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
# SPDX-License-Identifier: Apache-2.0
###############################################################

FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS publish
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS publish
ARG TARGETARCH
WORKDIR /
COPY LICENSE NOTICE.md DEPENDENCIES /
COPY src/ src/
WORKDIR /src/hub/PolicyHub.Service
RUN dotnet publish "PolicyHub.Service.csproj" -c Release -o /app/publish

FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine
FROM mcr.microsoft.com/dotnet/aspnet:9.0-alpine
ENV \
COMPlus_EnableDiagnostics=0 \
ASPNETCORE_URLS=http://+:8080
Expand Down
2 changes: 1 addition & 1 deletion docker/notice-policy-hub-migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ __Policy Hub Migrations__

__Used base images__

- Dockerfile: [mcr.microsoft.com/dotnet/runtime:8.0-alpine](https://github.com/dotnet/dotnet-docker/blob/main/src/runtime/8.0/alpine3.19/amd64/Dockerfile)
- Dockerfile: [mcr.microsoft.com/dotnet/runtime:9.0-alpine](https://github.com/dotnet/dotnet-docker/blob/main/src/runtime/9.0/alpine3.20/amd64/Dockerfile)
- GitHub project: [https://github.com/dotnet/dotnet-docker](https://github.com/dotnet/dotnet-docker)
- DockerHub: [https://hub.docker.com/_/microsoft-dotnet-runtime](https://hub.docker.com/_/microsoft-dotnet-runtime)

Expand Down
2 changes: 1 addition & 1 deletion docker/notice-policy-hub-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ __Policy Hub Service__

__Used base images__

- Dockerfile: [mcr.microsoft.com/dotnet/aspnet:8.0-alpine](https://github.com/dotnet/dotnet-docker/blob/main/src/aspnet/8.0/alpine3.19/amd64/Dockerfile)
- Dockerfile: [mcr.microsoft.com/dotnet/aspnet:9.0-alpine](https://github.com/dotnet/dotnet-docker/blob/main/src/aspnet/9.0/alpine3.20/amd64/Dockerfile)
- GitHub project: [https://github.com/dotnet/dotnet-docker](https://github.com/dotnet/dotnet-docker)
- DockerHub: [https://hub.docker.com/_/microsoft-dotnet-aspnet](https://hub.docker.com/_/microsoft-dotnet-aspnet)

Expand Down
8 changes: 4 additions & 4 deletions src/database/PolicyHub.DbAccess/PolicyHub.DbAccess.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<PropertyGroup>
<AssemblyName>Org.Eclipse.TractusX.PolicyHub.DbAccess</AssemblyName>
<RootNamespace>Org.Eclipse.TractusX.PolicyHub.DbAccess</RootNamespace>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
Expand All @@ -32,9 +32,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="8.0.12" />
<PackageReference Include="Org.Eclipse.TractusX.Portal.Backend.Framework.DependencyInjection" Version="2.17.0" />
<PackageReference Include="Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling" Version="2.17.0" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="9.0.1" />
<PackageReference Include="Org.Eclipse.TractusX.Portal.Backend.Framework.DependencyInjection" Version="3.0.0" />
<PackageReference Include="Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling" Version="3.0.0" />
</ItemGroup>

</Project>
8 changes: 4 additions & 4 deletions src/database/PolicyHub.Entities/PolicyHub.Entities.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@
<PropertyGroup>
<AssemblyName>Org.Eclipse.TractusX.PolicyHub.Entities</AssemblyName>
<RootNamespace>Org.Eclipse.TractusX.PolicyHub.Entities</RootNamespace>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="EFCore.NamingConventions" Version="8.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.12">
<PackageReference Include="EFCore.NamingConventions" Version="9.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.11" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.3" />
</ItemGroup>
<ItemGroup>
<SonarQubeSetting Include="sonar.coverage.exclusions">
Expand Down
24 changes: 12 additions & 12 deletions src/database/PolicyHub.Migrations/PolicyHub.Migrations.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<PropertyGroup>
<AssemblyName>Org.Eclipse.TractusX.PolicyHub.Migrations</AssemblyName>
<RootNamespace>Org.Eclipse.TractusX.PolicyHub.Migrations</RootNamespace>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
Expand All @@ -33,20 +33,20 @@
<SonarQubeExclude>true</SonarQubeExclude>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.12">
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" />
<PackageReference Include="Org.Eclipse.TractusX.Portal.Backend.Framework.Logging" Version="2.17.0" />
<PackageReference Include="Org.Eclipse.TractusX.Portal.Backend.Framework.Seeding" Version="2.17.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="9.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.1" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="9.0.1" />
<PackageReference Include="Org.Eclipse.TractusX.Portal.Backend.Framework.Logging" Version="3.0.0" />
<PackageReference Include="Org.Eclipse.TractusX.Portal.Backend.Framework.Seeding" Version="3.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions src/hub/PolicyHub.Service/PolicyHub.Service.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<PropertyGroup>
<AssemblyName>Org.Eclipse.TractusX.PolicyHub.Service</AssemblyName>
<RootNamespace>Org.Eclipse.TractusX.PolicyHub.Service</RootNamespace>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
Expand All @@ -40,9 +40,9 @@

<ItemGroup>
<PackageReference Include="Flurl.Signed" Version="4.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.12" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.12" />
<PackageReference Include="Org.Eclipse.TractusX.Portal.Backend.Framework.Web" Version="2.17.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="9.0.1" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.1" />
<PackageReference Include="Org.Eclipse.TractusX.Portal.Backend.Framework.Web" Version="3.0.0" />
<PackageReference Include="System.Json" Version="4.8.0" />
<PackageReference Include="System.Linq" Version="4.3.0" />
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<PropertyGroup>
<AssemblyName>Org.Eclipse.TractusX.PolicyHub.DbAccess.Tests</AssemblyName>
<RootNamespace>Org.Eclipse.TractusX.PolicyHub.DbAccess.Tests</RootNamespace>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
Expand All @@ -36,15 +36,15 @@
<PackageReference Include="AutoFixture.Xunit2" Version="4.18.1" />
<PackageReference Include="FakeItEasy" Version="8.3.0" />
<PackageReference Include="FluentAssertions" Version="6.12.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="9.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="AutoFixture" Version="4.18.1" />
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
<PackageReference Include="Testcontainers" Version="4.1.0" />
<PackageReference Include="Testcontainers.PostgreSql" Version="4.1.0" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="Xunit.Extensions.AssemblyFixture" Version="2.6.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<PropertyGroup>
<AssemblyName>Org.Eclipse.TractusX.PolicyHub.Entities.Tests</AssemblyName>
<RootNamespace>Org.Eclipse.TractusX.PolicyHub.Entities.Tests</RootNamespace>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
Expand All @@ -40,7 +40,7 @@
<PackageReference Include="AutoFixture" Version="4.18.1" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="Xunit.Extensions.AssemblyFixture" Version="2.6.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<PropertyGroup>
<AssemblyName>Org.Eclipse.TractusX.PolicyHub.Service.Tests</AssemblyName>
<RootNamespace>Org.Eclipse.TractusX.PolicyHub.Service.Tests</RootNamespace>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
Expand All @@ -37,12 +37,12 @@
<PackageReference Include="AutoFixture.Xunit2" Version="4.18.1" />
<PackageReference Include="FakeItEasy" Version="8.3.0" />
<PackageReference Include="FluentAssertions" Version="6.12.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.12" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="9.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="Testcontainers.PostgreSql" Version="4.1.0" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down

0 comments on commit 68aab4a

Please # to comment.