From 7837ac9578795d4c310bb92c205dfef523e4223d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20B=C4=85czek?= <74410956+kamilbaczek@users.noreply.github.com> Date: Tue, 19 Nov 2024 18:08:44 +0100 Subject: [PATCH] feat: upgrade to .NET 9 (#171) --- .github/workflows/chapter-2-workflow.yml | 6 ++--- .../Fitnet.Common.Api.csproj | 5 ++-- .../Fitnet.Common.Core.csproj | 3 ++- .../Fitnet.Common.Infrastructure.csproj | 14 +++++----- .../Fitnet.Common.IntegrationTests.csproj | 26 +++++++++++-------- .../Fitnet.Common.Api.UnitTests.csproj | 9 ++++--- .../Fitnet.Common.Core.UnitTests.csproj | 7 ++--- ...mon.Infrastructure.IntegrationTests.csproj | 3 ++- .../Fitnet.Contracts.Api.csproj | 5 ++-- .../Fitnet.Contracts.Application.csproj | 5 ++-- .../Fitnet.Contracts.Core.csproj | 4 +++ .../Fitnet.Contracts.Infrastructure.csproj | 10 ++++--- .../Fitnet.Contracts.IntegrationEvents.csproj | 4 +++ .../Fitnet.Contracts.Core.UnitTests.csproj | 16 +++++++----- .../Fitnet.Contracts.IntegrationTests.csproj | 7 ++--- .../Src/Directory.Build.props | 2 +- Chapter-2-modules-separation/Src/Dockerfile | 4 +-- .../Src/Fitnet/Fitnet.csproj | 5 ++-- .../Fitnet.Offers.Api.csproj | 4 +++ .../Fitnet.Offers.DataAccess.csproj | 8 +++--- .../Fitnet.Offers.IntegrationTests.csproj | 7 ++--- .../Fitnet.Passes.Api.csproj | 3 ++- .../Fitnet.Passes.DataAccess.csproj | 8 +++--- .../Fitnet.Passes.IntegrationEvents.csproj | 3 +++ .../Fitnet.Passes.IntegrationTests.csproj | 7 ++--- .../Fitnet.Reports/Fitnet.Reports.csproj | 5 ++-- .../Fitnet.Reports.IntegrationTests.csproj | 5 ++-- 27 files changed, 115 insertions(+), 70 deletions(-) diff --git a/.github/workflows/chapter-2-workflow.yml b/.github/workflows/chapter-2-workflow.yml index 120edd6a..6dcec19c 100644 --- a/.github/workflows/chapter-2-workflow.yml +++ b/.github/workflows/chapter-2-workflow.yml @@ -25,7 +25,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 8.0.x + dotnet-version: 9.0.x - name: Restore dependencies run: dotnet restore - name: Build @@ -43,8 +43,8 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 8.0.x + dotnet-version: 9.0.x - name: Restore dependencies run: dotnet restore - name: Test - run: dotnet test \ No newline at end of file + run: dotnet test diff --git a/Chapter-2-modules-separation/Src/Common/Fitnet.Common.Api/Fitnet.Common.Api.csproj b/Chapter-2-modules-separation/Src/Common/Fitnet.Common.Api/Fitnet.Common.Api.csproj index 62d9a410..ce0319dc 100644 --- a/Chapter-2-modules-separation/Src/Common/Fitnet.Common.Api/Fitnet.Common.Api.csproj +++ b/Chapter-2-modules-separation/Src/Common/Fitnet.Common.Api/Fitnet.Common.Api.csproj @@ -16,8 +16,9 @@ - - + + + diff --git a/Chapter-2-modules-separation/Src/Common/Fitnet.Common.Core/Fitnet.Common.Core.csproj b/Chapter-2-modules-separation/Src/Common/Fitnet.Common.Core/Fitnet.Common.Core.csproj index 56c330cf..147f7da4 100644 --- a/Chapter-2-modules-separation/Src/Common/Fitnet.Common.Core/Fitnet.Common.Core.csproj +++ b/Chapter-2-modules-separation/Src/Common/Fitnet.Common.Core/Fitnet.Common.Core.csproj @@ -1,5 +1,6 @@ - + + diff --git a/Chapter-2-modules-separation/Src/Common/Fitnet.Common.Infrastructure/Fitnet.Common.Infrastructure.csproj b/Chapter-2-modules-separation/Src/Common/Fitnet.Common.Infrastructure/Fitnet.Common.Infrastructure.csproj index 05249ab9..c88b53c7 100644 --- a/Chapter-2-modules-separation/Src/Common/Fitnet.Common.Infrastructure/Fitnet.Common.Infrastructure.csproj +++ b/Chapter-2-modules-separation/Src/Common/Fitnet.Common.Infrastructure/Fitnet.Common.Infrastructure.csproj @@ -1,13 +1,15 @@ - + - - - - - + + + + + + + diff --git a/Chapter-2-modules-separation/Src/Common/Fitnet.Common.IntegrationTests/Fitnet.Common.IntegrationTests.csproj b/Chapter-2-modules-separation/Src/Common/Fitnet.Common.IntegrationTests/Fitnet.Common.IntegrationTests.csproj index a9f443a4..56679c8f 100644 --- a/Chapter-2-modules-separation/Src/Common/Fitnet.Common.IntegrationTests/Fitnet.Common.IntegrationTests.csproj +++ b/Chapter-2-modules-separation/Src/Common/Fitnet.Common.IntegrationTests/Fitnet.Common.IntegrationTests.csproj @@ -6,25 +6,29 @@ - - - - - + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all + diff --git a/Chapter-2-modules-separation/Src/Common/Tests/Fitnet.Common.Api.UnitTests/Fitnet.Common.Api.UnitTests.csproj b/Chapter-2-modules-separation/Src/Common/Tests/Fitnet.Common.Api.UnitTests/Fitnet.Common.Api.UnitTests.csproj index 79efb915..5da3e17c 100644 --- a/Chapter-2-modules-separation/Src/Common/Tests/Fitnet.Common.Api.UnitTests/Fitnet.Common.Api.UnitTests.csproj +++ b/Chapter-2-modules-separation/Src/Common/Tests/Fitnet.Common.Api.UnitTests/Fitnet.Common.Api.UnitTests.csproj @@ -9,10 +9,11 @@ - - - - + + + + + \ No newline at end of file diff --git a/Chapter-2-modules-separation/Src/Common/Tests/Fitnet.Common.Core.UnitTests/Fitnet.Common.Core.UnitTests.csproj b/Chapter-2-modules-separation/Src/Common/Tests/Fitnet.Common.Core.UnitTests/Fitnet.Common.Core.UnitTests.csproj index 5291bfaa..6d41db9a 100644 --- a/Chapter-2-modules-separation/Src/Common/Tests/Fitnet.Common.Core.UnitTests/Fitnet.Common.Core.UnitTests.csproj +++ b/Chapter-2-modules-separation/Src/Common/Tests/Fitnet.Common.Core.UnitTests/Fitnet.Common.Core.UnitTests.csproj @@ -9,9 +9,10 @@ - - - + + + + \ No newline at end of file diff --git a/Chapter-2-modules-separation/Src/Common/Tests/Fitnet.Common.Infrastructure.IntegrationTests/Fitnet.Common.Infrastructure.IntegrationTests.csproj b/Chapter-2-modules-separation/Src/Common/Tests/Fitnet.Common.Infrastructure.IntegrationTests/Fitnet.Common.Infrastructure.IntegrationTests.csproj index 703c3cd3..7b539ac3 100644 --- a/Chapter-2-modules-separation/Src/Common/Tests/Fitnet.Common.Infrastructure.IntegrationTests/Fitnet.Common.Infrastructure.IntegrationTests.csproj +++ b/Chapter-2-modules-separation/Src/Common/Tests/Fitnet.Common.Infrastructure.IntegrationTests/Fitnet.Common.Infrastructure.IntegrationTests.csproj @@ -5,7 +5,8 @@ - + + diff --git a/Chapter-2-modules-separation/Src/Contracts/Fitnet.Contracts.Api/Fitnet.Contracts.Api.csproj b/Chapter-2-modules-separation/Src/Contracts/Fitnet.Contracts.Api/Fitnet.Contracts.Api.csproj index cf6caef9..5809e1af 100644 --- a/Chapter-2-modules-separation/Src/Contracts/Fitnet.Contracts.Api/Fitnet.Contracts.Api.csproj +++ b/Chapter-2-modules-separation/Src/Contracts/Fitnet.Contracts.Api/Fitnet.Contracts.Api.csproj @@ -19,8 +19,9 @@ - - + + + \ No newline at end of file diff --git a/Chapter-2-modules-separation/Src/Contracts/Fitnet.Contracts.Application/Fitnet.Contracts.Application.csproj b/Chapter-2-modules-separation/Src/Contracts/Fitnet.Contracts.Application/Fitnet.Contracts.Application.csproj index 831d77ab..c424db0e 100644 --- a/Chapter-2-modules-separation/Src/Contracts/Fitnet.Contracts.Application/Fitnet.Contracts.Application.csproj +++ b/Chapter-2-modules-separation/Src/Contracts/Fitnet.Contracts.Application/Fitnet.Contracts.Application.csproj @@ -1,7 +1,8 @@ - - + + + diff --git a/Chapter-2-modules-separation/Src/Contracts/Fitnet.Contracts.Core/Fitnet.Contracts.Core.csproj b/Chapter-2-modules-separation/Src/Contracts/Fitnet.Contracts.Core/Fitnet.Contracts.Core.csproj index b7798f95..0a2ef782 100644 --- a/Chapter-2-modules-separation/Src/Contracts/Fitnet.Contracts.Core/Fitnet.Contracts.Core.csproj +++ b/Chapter-2-modules-separation/Src/Contracts/Fitnet.Contracts.Core/Fitnet.Contracts.Core.csproj @@ -6,5 +6,9 @@ + + + + \ No newline at end of file diff --git a/Chapter-2-modules-separation/Src/Contracts/Fitnet.Contracts.Infrastructure/Fitnet.Contracts.Infrastructure.csproj b/Chapter-2-modules-separation/Src/Contracts/Fitnet.Contracts.Infrastructure/Fitnet.Contracts.Infrastructure.csproj index 5ec54c7f..dfeedc73 100644 --- a/Chapter-2-modules-separation/Src/Contracts/Fitnet.Contracts.Infrastructure/Fitnet.Contracts.Infrastructure.csproj +++ b/Chapter-2-modules-separation/Src/Contracts/Fitnet.Contracts.Infrastructure/Fitnet.Contracts.Infrastructure.csproj @@ -5,11 +5,13 @@ - + - - - + + + + + diff --git a/Chapter-2-modules-separation/Src/Contracts/Fitnet.Contracts.IntegrationEvents/Fitnet.Contracts.IntegrationEvents.csproj b/Chapter-2-modules-separation/Src/Contracts/Fitnet.Contracts.IntegrationEvents/Fitnet.Contracts.IntegrationEvents.csproj index a72e259c..3ee7705c 100644 --- a/Chapter-2-modules-separation/Src/Contracts/Fitnet.Contracts.IntegrationEvents/Fitnet.Contracts.IntegrationEvents.csproj +++ b/Chapter-2-modules-separation/Src/Contracts/Fitnet.Contracts.IntegrationEvents/Fitnet.Contracts.IntegrationEvents.csproj @@ -3,4 +3,8 @@ + + + + \ No newline at end of file diff --git a/Chapter-2-modules-separation/Src/Contracts/Tests/Fitnet.Contracts.Core.UnitTests/Fitnet.Contracts.Core.UnitTests.csproj b/Chapter-2-modules-separation/Src/Contracts/Tests/Fitnet.Contracts.Core.UnitTests/Fitnet.Contracts.Core.UnitTests.csproj index e96d0f90..707d1a0c 100644 --- a/Chapter-2-modules-separation/Src/Contracts/Tests/Fitnet.Contracts.Core.UnitTests/Fitnet.Contracts.Core.UnitTests.csproj +++ b/Chapter-2-modules-separation/Src/Contracts/Tests/Fitnet.Contracts.Core.UnitTests/Fitnet.Contracts.Core.UnitTests.csproj @@ -5,20 +5,24 @@ - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + runtime; build; native; contentfiles; analyzers; buildtransitive all + diff --git a/Chapter-2-modules-separation/Src/Contracts/Tests/Fitnet.Contracts.IntegrationTests/Fitnet.Contracts.IntegrationTests.csproj b/Chapter-2-modules-separation/Src/Contracts/Tests/Fitnet.Contracts.IntegrationTests/Fitnet.Contracts.IntegrationTests.csproj index 63bfaa2c..f1322f0d 100644 --- a/Chapter-2-modules-separation/Src/Contracts/Tests/Fitnet.Contracts.IntegrationTests/Fitnet.Contracts.IntegrationTests.csproj +++ b/Chapter-2-modules-separation/Src/Contracts/Tests/Fitnet.Contracts.IntegrationTests/Fitnet.Contracts.IntegrationTests.csproj @@ -5,9 +5,10 @@ - - - + + + + diff --git a/Chapter-2-modules-separation/Src/Directory.Build.props b/Chapter-2-modules-separation/Src/Directory.Build.props index 7d24d0d1..87a0e02d 100644 --- a/Chapter-2-modules-separation/Src/Directory.Build.props +++ b/Chapter-2-modules-separation/Src/Directory.Build.props @@ -3,7 +3,7 @@ EvolutionaryArchitecture.$(MSBuildProjectName) $(AssemblyName) - net8.0 + net9.0 latest true true diff --git a/Chapter-2-modules-separation/Src/Dockerfile b/Chapter-2-modules-separation/Src/Dockerfile index 1898d116..c7eab40d 100644 --- a/Chapter-2-modules-separation/Src/Dockerfile +++ b/Chapter-2-modules-separation/Src/Dockerfile @@ -1,9 +1,9 @@ -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base WORKDIR /app EXPOSE 80 EXPOSE 443 -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build WORKDIR /src COPY Directory.Build.props ./ COPY ["Fitnet/Fitnet.csproj", "Fitnet/"] diff --git a/Chapter-2-modules-separation/Src/Fitnet/Fitnet.csproj b/Chapter-2-modules-separation/Src/Fitnet/Fitnet.csproj index 87962f41..251716c3 100644 --- a/Chapter-2-modules-separation/Src/Fitnet/Fitnet.csproj +++ b/Chapter-2-modules-separation/Src/Fitnet/Fitnet.csproj @@ -5,8 +5,9 @@ - - + + + diff --git a/Chapter-2-modules-separation/Src/Offers/Fitnet.Offers.Api/Fitnet.Offers.Api.csproj b/Chapter-2-modules-separation/Src/Offers/Fitnet.Offers.Api/Fitnet.Offers.Api.csproj index 3c50e702..d51e354d 100644 --- a/Chapter-2-modules-separation/Src/Offers/Fitnet.Offers.Api/Fitnet.Offers.Api.csproj +++ b/Chapter-2-modules-separation/Src/Offers/Fitnet.Offers.Api/Fitnet.Offers.Api.csproj @@ -14,4 +14,8 @@ + + + + \ No newline at end of file diff --git a/Chapter-2-modules-separation/Src/Offers/Fitnet.Offers.DataAccess/Fitnet.Offers.DataAccess.csproj b/Chapter-2-modules-separation/Src/Offers/Fitnet.Offers.DataAccess/Fitnet.Offers.DataAccess.csproj index defda8d6..df66c568 100644 --- a/Chapter-2-modules-separation/Src/Offers/Fitnet.Offers.DataAccess/Fitnet.Offers.DataAccess.csproj +++ b/Chapter-2-modules-separation/Src/Offers/Fitnet.Offers.DataAccess/Fitnet.Offers.DataAccess.csproj @@ -1,8 +1,10 @@ - - - + + + + + \ No newline at end of file diff --git a/Chapter-2-modules-separation/Src/Offers/Tests/Fitnet.Offers.IntegrationTests/Fitnet.Offers.IntegrationTests.csproj b/Chapter-2-modules-separation/Src/Offers/Tests/Fitnet.Offers.IntegrationTests/Fitnet.Offers.IntegrationTests.csproj index d98edda0..ac19e65c 100644 --- a/Chapter-2-modules-separation/Src/Offers/Tests/Fitnet.Offers.IntegrationTests/Fitnet.Offers.IntegrationTests.csproj +++ b/Chapter-2-modules-separation/Src/Offers/Tests/Fitnet.Offers.IntegrationTests/Fitnet.Offers.IntegrationTests.csproj @@ -5,9 +5,10 @@ - - - + + + + diff --git a/Chapter-2-modules-separation/Src/Passes/Fitnet.Passes.Api/Fitnet.Passes.Api.csproj b/Chapter-2-modules-separation/Src/Passes/Fitnet.Passes.Api/Fitnet.Passes.Api.csproj index 22678f96..a96f51ca 100644 --- a/Chapter-2-modules-separation/Src/Passes/Fitnet.Passes.Api/Fitnet.Passes.Api.csproj +++ b/Chapter-2-modules-separation/Src/Passes/Fitnet.Passes.Api/Fitnet.Passes.Api.csproj @@ -18,6 +18,7 @@ - + + diff --git a/Chapter-2-modules-separation/Src/Passes/Fitnet.Passes.DataAccess/Fitnet.Passes.DataAccess.csproj b/Chapter-2-modules-separation/Src/Passes/Fitnet.Passes.DataAccess/Fitnet.Passes.DataAccess.csproj index 17bf865d..3a74b9cb 100644 --- a/Chapter-2-modules-separation/Src/Passes/Fitnet.Passes.DataAccess/Fitnet.Passes.DataAccess.csproj +++ b/Chapter-2-modules-separation/Src/Passes/Fitnet.Passes.DataAccess/Fitnet.Passes.DataAccess.csproj @@ -1,8 +1,10 @@ - - - + + + + + \ No newline at end of file diff --git a/Chapter-2-modules-separation/Src/Passes/Fitnet.Passes.IntegrationEvents/Fitnet.Passes.IntegrationEvents.csproj b/Chapter-2-modules-separation/Src/Passes/Fitnet.Passes.IntegrationEvents/Fitnet.Passes.IntegrationEvents.csproj index 4d4e1c86..a2a1446f 100644 --- a/Chapter-2-modules-separation/Src/Passes/Fitnet.Passes.IntegrationEvents/Fitnet.Passes.IntegrationEvents.csproj +++ b/Chapter-2-modules-separation/Src/Passes/Fitnet.Passes.IntegrationEvents/Fitnet.Passes.IntegrationEvents.csproj @@ -2,4 +2,7 @@ + + + diff --git a/Chapter-2-modules-separation/Src/Passes/Tests/Fitnet.Passes.IntegrationTests/Fitnet.Passes.IntegrationTests.csproj b/Chapter-2-modules-separation/Src/Passes/Tests/Fitnet.Passes.IntegrationTests/Fitnet.Passes.IntegrationTests.csproj index 0e4115f1..78031737 100644 --- a/Chapter-2-modules-separation/Src/Passes/Tests/Fitnet.Passes.IntegrationTests/Fitnet.Passes.IntegrationTests.csproj +++ b/Chapter-2-modules-separation/Src/Passes/Tests/Fitnet.Passes.IntegrationTests/Fitnet.Passes.IntegrationTests.csproj @@ -5,9 +5,10 @@ - - - + + + + diff --git a/Chapter-2-modules-separation/Src/Reports/Fitnet.Reports/Fitnet.Reports.csproj b/Chapter-2-modules-separation/Src/Reports/Fitnet.Reports/Fitnet.Reports.csproj index 8b274bb9..0d6a0034 100644 --- a/Chapter-2-modules-separation/Src/Reports/Fitnet.Reports/Fitnet.Reports.csproj +++ b/Chapter-2-modules-separation/Src/Reports/Fitnet.Reports/Fitnet.Reports.csproj @@ -8,8 +8,9 @@ - - + + + diff --git a/Chapter-2-modules-separation/Src/Reports/Tests/Fitnet.Reports.IntegrationTests/Fitnet.Reports.IntegrationTests.csproj b/Chapter-2-modules-separation/Src/Reports/Tests/Fitnet.Reports.IntegrationTests/Fitnet.Reports.IntegrationTests.csproj index d2b2e1a4..ad99b22b 100644 --- a/Chapter-2-modules-separation/Src/Reports/Tests/Fitnet.Reports.IntegrationTests/Fitnet.Reports.IntegrationTests.csproj +++ b/Chapter-2-modules-separation/Src/Reports/Tests/Fitnet.Reports.IntegrationTests/Fitnet.Reports.IntegrationTests.csproj @@ -5,8 +5,9 @@ - - + + +