From a8a149fcbeb830e4d68b16eba1aaaccabe2593fc Mon Sep 17 00:00:00 2001 From: Henrique Holtz Date: Sat, 13 Apr 2024 13:57:06 -0300 Subject: [PATCH 1/6] feat: targeting all projects from .Net 6 to .NET 8 --- ShareBook/ShareBook.Api/ShareBook.Api.csproj | 2 +- ShareBook/ShareBook.Domain/ShareBook.Domain.csproj | 2 +- ShareBook/ShareBook.Helper/ShareBook.Helper.csproj | 2 +- .../ShareBook.Infra.CrossCutting.Identity.csproj | 2 +- ShareBook/ShareBook.Repository/ShareBook.Infra.Data.csproj | 2 +- ShareBook/ShareBook.Service/ShareBook.Service.csproj | 2 +- ShareBook/ShareBook.Test.Unit/ShareBook.Test.Unit.csproj | 2 +- ShareBook/Sharebook.Jobs/Sharebook.Jobs.csproj | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ShareBook/ShareBook.Api/ShareBook.Api.csproj b/ShareBook/ShareBook.Api/ShareBook.Api.csproj index ec502307..49defc5b 100644 --- a/ShareBook/ShareBook.Api/ShareBook.Api.csproj +++ b/ShareBook/ShareBook.Api/ShareBook.Api.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 diff --git a/ShareBook/ShareBook.Domain/ShareBook.Domain.csproj b/ShareBook/ShareBook.Domain/ShareBook.Domain.csproj index 1a40f71f..42ee002e 100644 --- a/ShareBook/ShareBook.Domain/ShareBook.Domain.csproj +++ b/ShareBook/ShareBook.Domain/ShareBook.Domain.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 diff --git a/ShareBook/ShareBook.Helper/ShareBook.Helper.csproj b/ShareBook/ShareBook.Helper/ShareBook.Helper.csproj index 3b4d968a..976dc221 100644 --- a/ShareBook/ShareBook.Helper/ShareBook.Helper.csproj +++ b/ShareBook/ShareBook.Helper/ShareBook.Helper.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 diff --git a/ShareBook/ShareBook.Infra.CrossCutting.Identity/ShareBook.Infra.CrossCutting.Identity.csproj b/ShareBook/ShareBook.Infra.CrossCutting.Identity/ShareBook.Infra.CrossCutting.Identity.csproj index c32e0338..22d24422 100644 --- a/ShareBook/ShareBook.Infra.CrossCutting.Identity/ShareBook.Infra.CrossCutting.Identity.csproj +++ b/ShareBook/ShareBook.Infra.CrossCutting.Identity/ShareBook.Infra.CrossCutting.Identity.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 diff --git a/ShareBook/ShareBook.Repository/ShareBook.Infra.Data.csproj b/ShareBook/ShareBook.Repository/ShareBook.Infra.Data.csproj index 3c84381f..369e6ae1 100644 --- a/ShareBook/ShareBook.Repository/ShareBook.Infra.Data.csproj +++ b/ShareBook/ShareBook.Repository/ShareBook.Infra.Data.csproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 diff --git a/ShareBook/ShareBook.Service/ShareBook.Service.csproj b/ShareBook/ShareBook.Service/ShareBook.Service.csproj index 62a559ec..e6780e73 100644 --- a/ShareBook/ShareBook.Service/ShareBook.Service.csproj +++ b/ShareBook/ShareBook.Service/ShareBook.Service.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 Full diff --git a/ShareBook/ShareBook.Test.Unit/ShareBook.Test.Unit.csproj b/ShareBook/ShareBook.Test.Unit/ShareBook.Test.Unit.csproj index eb2aa547..280bcc45 100644 --- a/ShareBook/ShareBook.Test.Unit/ShareBook.Test.Unit.csproj +++ b/ShareBook/ShareBook.Test.Unit/ShareBook.Test.Unit.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 false diff --git a/ShareBook/Sharebook.Jobs/Sharebook.Jobs.csproj b/ShareBook/Sharebook.Jobs/Sharebook.Jobs.csproj index 70c3997d..4adc1665 100644 --- a/ShareBook/Sharebook.Jobs/Sharebook.Jobs.csproj +++ b/ShareBook/Sharebook.Jobs/Sharebook.Jobs.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 From b822cbbdb6d6e4521c4fb4b357c936a80cb4a48d Mon Sep 17 00:00:00 2001 From: Henrique Holtz Date: Sat, 13 Apr 2024 14:20:23 -0300 Subject: [PATCH 2/6] feat: Update all possible packages --- ShareBook/ShareBook.Api/ShareBook.Api.csproj | 11 +++++------ ShareBook/ShareBook.Domain/ShareBook.Domain.csproj | 2 +- ShareBook/ShareBook.Helper/ShareBook.Helper.csproj | 6 +++--- .../ShareBook.Infra.CrossCutting.Identity.csproj | 2 +- .../ShareBook.Repository/ShareBook.Infra.Data.csproj | 4 ++-- .../ShareBook.Service/Muambator/MuambatorService.cs | 2 +- ShareBook/ShareBook.Service/ShareBook.Service.csproj | 4 ++-- .../ShareBook.Test.Unit/ShareBook.Test.Unit.csproj | 10 +++++----- 8 files changed, 20 insertions(+), 21 deletions(-) diff --git a/ShareBook/ShareBook.Api/ShareBook.Api.csproj b/ShareBook/ShareBook.Api/ShareBook.Api.csproj index 49defc5b..273a3bc7 100644 --- a/ShareBook/ShareBook.Api/ShareBook.Api.csproj +++ b/ShareBook/ShareBook.Api/ShareBook.Api.csproj @@ -9,16 +9,15 @@ - - - + + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/ShareBook/ShareBook.Domain/ShareBook.Domain.csproj b/ShareBook/ShareBook.Domain/ShareBook.Domain.csproj index 42ee002e..b0b642f3 100644 --- a/ShareBook/ShareBook.Domain/ShareBook.Domain.csproj +++ b/ShareBook/ShareBook.Domain/ShareBook.Domain.csproj @@ -11,7 +11,7 @@ - + diff --git a/ShareBook/ShareBook.Helper/ShareBook.Helper.csproj b/ShareBook/ShareBook.Helper/ShareBook.Helper.csproj index 976dc221..5526e563 100644 --- a/ShareBook/ShareBook.Helper/ShareBook.Helper.csproj +++ b/ShareBook/ShareBook.Helper/ShareBook.Helper.csproj @@ -5,9 +5,9 @@ - - - + + + diff --git a/ShareBook/ShareBook.Infra.CrossCutting.Identity/ShareBook.Infra.CrossCutting.Identity.csproj b/ShareBook/ShareBook.Infra.CrossCutting.Identity/ShareBook.Infra.CrossCutting.Identity.csproj index 22d24422..5a3eda5c 100644 --- a/ShareBook/ShareBook.Infra.CrossCutting.Identity/ShareBook.Infra.CrossCutting.Identity.csproj +++ b/ShareBook/ShareBook.Infra.CrossCutting.Identity/ShareBook.Infra.CrossCutting.Identity.csproj @@ -5,7 +5,7 @@ - + diff --git a/ShareBook/ShareBook.Repository/ShareBook.Infra.Data.csproj b/ShareBook/ShareBook.Repository/ShareBook.Infra.Data.csproj index 369e6ae1..f3073367 100644 --- a/ShareBook/ShareBook.Repository/ShareBook.Infra.Data.csproj +++ b/ShareBook/ShareBook.Repository/ShareBook.Infra.Data.csproj @@ -4,8 +4,8 @@ - - + + diff --git a/ShareBook/ShareBook.Service/Muambator/MuambatorService.cs b/ShareBook/ShareBook.Service/Muambator/MuambatorService.cs index 99d3f4fa..fb9106d7 100644 --- a/ShareBook/ShareBook.Service/Muambator/MuambatorService.cs +++ b/ShareBook/ShareBook.Service/Muambator/MuambatorService.cs @@ -53,7 +53,7 @@ public async Task RemovePackageToTrackerAsync(string packageNumber try { - result = await url.DeleteAsync().ReceiveJson(); + result = await url.DeleteAsync().ReceiveJson(); } catch (FlurlHttpTimeoutException) { diff --git a/ShareBook/ShareBook.Service/ShareBook.Service.csproj b/ShareBook/ShareBook.Service/ShareBook.Service.csproj index e6780e73..541b4aac 100644 --- a/ShareBook/ShareBook.Service/ShareBook.Service.csproj +++ b/ShareBook/ShareBook.Service/ShareBook.Service.csproj @@ -6,8 +6,8 @@ - - + + diff --git a/ShareBook/ShareBook.Test.Unit/ShareBook.Test.Unit.csproj b/ShareBook/ShareBook.Test.Unit/ShareBook.Test.Unit.csproj index 280bcc45..4aa3f189 100644 --- a/ShareBook/ShareBook.Test.Unit/ShareBook.Test.Unit.csproj +++ b/ShareBook/ShareBook.Test.Unit/ShareBook.Test.Unit.csproj @@ -7,11 +7,11 @@ - - - - - + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive From 7fbcb7edf8c3d3234b141354a8a095c2db27e9a1 Mon Sep 17 00:00:00 2001 From: Henrique Holtz Date: Sat, 13 Apr 2024 14:24:07 -0300 Subject: [PATCH 3/6] ci: Update "build" stage to .Net 8 --- .github/workflows/dotnet-build-validation.yml | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/dotnet-build-validation.yml b/.github/workflows/dotnet-build-validation.yml index 70d772bc..5470b7e0 100644 --- a/.github/workflows/dotnet-build-validation.yml +++ b/.github/workflows/dotnet-build-validation.yml @@ -2,24 +2,23 @@ name: .NET build validation on: push: - branches: [ develop ] + branches: [develop] pull_request: - branches: [ develop ] + branches: [develop] jobs: build: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 6.0.x - - name: Restore dependencies - run: dotnet restore ./ShareBook/ShareBook.sln - - name: Build - run: dotnet build ./ShareBook/ShareBook.sln --no-restore - - name: Test - run: dotnet test ./ShareBook/ShareBook.sln --no-build --verbosity normal + - uses: actions/checkout@v2 + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 8.0.x + - name: Restore dependencies + run: dotnet restore ./ShareBook/ShareBook.sln + - name: Build + run: dotnet build ./ShareBook/ShareBook.sln --no-restore + - name: Test + run: dotnet test ./ShareBook/ShareBook.sln --no-build --verbosity normal From 7d364bad65212d5186f6fa0dd9eb25f6286a50f7 Mon Sep 17 00:00:00 2001 From: Henrique Holtz Date: Sat, 13 Apr 2024 14:24:51 -0300 Subject: [PATCH 4/6] feat: Dockerfile => Updating to use .Net 8 --- ShareBook/ShareBook.Api/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ShareBook/ShareBook.Api/Dockerfile b/ShareBook/ShareBook.Api/Dockerfile index bfc47a13..0b89cc26 100644 --- a/ShareBook/ShareBook.Api/Dockerfile +++ b/ShareBook/ShareBook.Api/Dockerfile @@ -1,10 +1,10 @@ #See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. -FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base WORKDIR /app EXPOSE 80 -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /src COPY ["ShareBook.Api/ShareBook.Api.csproj", "ShareBook.Api/"] COPY ["ShareBook.Service/ShareBook.Service.csproj", "ShareBook.Service/"] From 122ea23d0505363d95c774e9af62e5696d595f4d Mon Sep 17 00:00:00 2001 From: Henrique Holtz Date: Sat, 13 Apr 2024 14:50:23 -0300 Subject: [PATCH 5/6] docs: Update README --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 59cacac5..ac910c7e 100644 --- a/README.md +++ b/README.md @@ -54,8 +54,9 @@ https://trello.com/invite/sharebook6/928f21ef82592b5edafde06f171d338b
## **6 - Rodar o app pela primeira vez?** -- Instalar o .NET SDK 6 (stable) -https://github.com/SharebookBR/sharebook-backend/wiki/Como-rodar-o-projeto%3F + +- Instalar o .NET SDK 8 (stable) + https://github.com/SharebookBR/sharebook-backend/wiki/Como-rodar-o-projeto%3F ## **7 - Dicas Visual Studio Code** From fe5c8959abdfb6b8265946ba748d5387f375246f Mon Sep 17 00:00:00 2001 From: Henrique Holtz Date: Sat, 13 Apr 2024 15:08:00 -0300 Subject: [PATCH 6/6] chore: Adding default value to "ConnectionStrings:DefaultConnection" (to connect to the database from docker-compose) and a fake value to "TokenConfigurations:SecretJwtKey" --- ShareBook/ShareBook.Api/appsettings.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ShareBook/ShareBook.Api/appsettings.json b/ShareBook/ShareBook.Api/appsettings.json index b4783950..8bfe8594 100644 --- a/ShareBook/ShareBook.Api/appsettings.json +++ b/ShareBook/ShareBook.Api/appsettings.json @@ -1,12 +1,12 @@ { "ConnectionStrings": { - "DefaultConnection": "" + "DefaultConnection": "Server=127.0.0.1;Database=master;User=sa;Password=weWkh]6qA3jk;TrustServerCertificate=True;" }, "TokenConfigurations": { "Audience": "", "Issuer": "", "Seconds": 3600, - "SecretJwtKey": "" + "SecretJwtKey": "FakeValue" }, "Logging": { "LogLevel": {