Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade from .Net 6 to .Net 8 #550

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 13 additions & 14 deletions .github/workflows/dotnet-build-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ https://trello.com/invite/sharebook6/928f21ef82592b5edafde06f171d338b
</br>

## **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**

Expand Down
4 changes: 2 additions & 2 deletions ShareBook/ShareBook.Api/Dockerfile
Original file line number Diff line number Diff line change
@@ -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/"]
Expand Down
13 changes: 6 additions & 7 deletions ShareBook/ShareBook.Api/ShareBook.Api.csproj
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<PropertyGroup>
<SourceRevisionId>build$([System.DateTime]::UtcNow.ToString("yyyy-MM-ddTHH:mm:ss:fffZ"))</SourceRevisionId>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.SqlServer" Version="5.0.3" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="8.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.0" />
<PackageReference Include="AspNetCore.HealthChecks.SqlServer" Version="8.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.4" />
<PackageReference Include="Microsoft.AspNetCore.HealthChecks" Version="1.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.1">
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions ShareBook/ShareBook.Api/appsettings.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
4 changes: 2 additions & 2 deletions ShareBook/ShareBook.Domain/ShareBook.Domain.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand All @@ -11,7 +11,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="FluentValidation" Version="9.4.0" />
<PackageReference Include="FluentValidation" Version="9.5.4" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions ShareBook/ShareBook.Helper/ShareBook.Helper.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AutoMapper" Version="10.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Cryptography.KeyDerivation" Version="6.0.0" />
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.3" />
<PackageReference Include="AutoMapper" Version="13.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Cryptography.KeyDerivation" Version="8.0.4" />
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.7" />
</ItemGroup>
<ItemGroup>
<Folder Include="ClientVersionValidation\" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.14.1" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.5.1" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions ShareBook/ShareBook.Repository/ShareBook.Infra.Data.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="JsonDiffPatch.Net" Version="2.3.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ShareBook.Domain\ShareBook.Domain.csproj" />
Expand Down
2 changes: 1 addition & 1 deletion ShareBook/ShareBook.Service/Muambator/MuambatorService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public async Task<MuambatorDTO> RemovePackageToTrackerAsync(string packageNumber

try
{
result = await url.DeleteAsync().ReceiveJson();
result = await url.DeleteAsync().ReceiveJson<MuambatorDTO>();
}
catch (FlurlHttpTimeoutException)
{
Expand Down
6 changes: 3 additions & 3 deletions ShareBook/ShareBook.Service/ShareBook.Service.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<DebugType>Full</DebugType>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AWSSDK.SQS" Version="3.5.1.10" />
<PackageReference Include="Flurl.Http" Version="3.0.1" />
<PackageReference Include="AWSSDK.SQS" Version="3.7.300.74" />
<PackageReference Include="Flurl.Http" Version="4.0.2" />
<PackageReference Include="MailKit" Version="2.15.0" />
<PackageReference Include="OneSignal.RestAPIv3.Client" Version="1.2.0" />
<PackageReference Include="Rollbar" Version="4.0.3" />
Expand Down
12 changes: 6 additions & 6 deletions ShareBook/ShareBook.Test.Unit/ShareBook.Test.Unit.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="altcover" Version="8.3.839" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="Moq" Version="4.16.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="altcover" Version="8.8.10" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="Moq" Version="4.20.70" />
<PackageReference Include="xunit" Version="2.7.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.8">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion ShareBook/Sharebook.Jobs/Sharebook.Jobs.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Loading