Skip to content

Commit

Permalink
Merge pull request #780 from LuccaSA/net8
Browse files Browse the repository at this point in the history
UPdate : net6 -> net8
  • Loading branch information
harrich authored Oct 25, 2024
2 parents bbdef35 + 3b0dcf8 commit bfb679c
Show file tree
Hide file tree
Showing 28 changed files with 75 additions and 190 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
dotnet-version: '8.0.x'

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.15
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
</ItemGroup>

</Project>
6 changes: 6 additions & 0 deletions Rdd.sln
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Rdd.Application", "src\Rdd.
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{505AAC10-0297-43ED-8097-22B0CB65030B}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
.gitignore = .gitignore
build.ps1 = build.ps1
CODEOWNERS = CODEOWNERS
coverlet.runsettings = coverlet.runsettings
Directory.Build.props = Directory.Build.props
.github\workflows\dotnet.yml = .github\workflows\dotnet.yml
GitVersion.yml = GitVersion.yml
global.json = global.json
README.md = README.md
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Rdd.Domain.Tests", "test\Rdd.Domain.Tests\Rdd.Domain.Tests.csproj", "{CB42A78B-6DC8-4A20-B7EB-228FA1324C70}"
Expand Down
1 change: 1 addition & 0 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ param(
dotnet pack .\Application\Rdd.Application\Rdd.Application.csproj --configuration Debug $propack -o $nuget_path
dotnet pack .\Web\Rdd.Web\Rdd.Web.csproj --configuration Debug $propack -o $nuget_path
dotnet pack .\Web\Rdd.Web.AutoMapper\RDD.Web.AutoMapper.csproj --configuration Debug $propack -o $nuget_path
dotnet pack .\Web\Rdd.Z.EntityFramework\Rdd.Z.EntityFramework.csproj --configuration Debug $propack -o $nuget_path

2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "6.0.0",
"version": "8.0.0",
"rollForward": "latestFeature"
}
}
8 changes: 4 additions & 4 deletions src/RDD.Web.AutoMapper/RDD.Web.AutoMapper.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 @@ -13,11 +13,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="AutoMapper" Version="12.0.0" />
<PackageReference Include="AutoMapper.Extensions.ExpressionMapping" Version="6.0.2" />
<PackageReference Include="AutoMapper" Version="13.0.1" />
<PackageReference Include="AutoMapper.Extensions.ExpressionMapping" Version="7.0.2" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0" />
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions src/Rdd.Application/Rdd.Application.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>
<ProjectGuid>{C07BD97E-A1DC-47FB-9C00-23B6B3CB70B8}</ProjectGuid>
</PropertyGroup>

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

<ItemGroup>
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0" />
</ItemGroup>

</Project>
5 changes: 0 additions & 5 deletions src/Rdd.Domain/Exceptions/BadRequestException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ public BadRequestException(string message, Exception innerException)
{
}

protected BadRequestException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}

public override HttpStatusCode StatusCode => HttpStatusCode.BadRequest;
}
}
12 changes: 0 additions & 12 deletions src/Rdd.Domain/Exceptions/BusinessException.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Net;
using System.Runtime.Serialization;

namespace Rdd.Domain.Exceptions
{
Expand All @@ -20,17 +19,6 @@ protected BusinessException(string message, Exception innerException)
{
}

protected BusinessException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}

public abstract HttpStatusCode StatusCode { get; }

public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
info.AddValue(nameof(StatusCode), StatusCode);
}
}
}
6 changes: 0 additions & 6 deletions src/Rdd.Domain/Exceptions/ForbiddenException.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Net;
using System.Runtime.Serialization;

namespace Rdd.Domain.Exceptions
{
Expand All @@ -12,11 +11,6 @@ public ForbiddenException(string message)
{
}

private ForbiddenException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}

public override HttpStatusCode StatusCode => HttpStatusCode.Forbidden;
}
}
12 changes: 0 additions & 12 deletions src/Rdd.Domain/Exceptions/TechnicalException.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Net;
using System.Runtime.Serialization;

namespace Rdd.Domain.Exceptions
{
Expand All @@ -21,17 +20,6 @@ public TechnicalException(string message, Exception innerException)
{
}

private TechnicalException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}

public HttpStatusCode StatusCode => HttpStatusCode.InternalServerError;

public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
info.AddValue(nameof(StatusCode), StatusCode);
}
}
}
6 changes: 0 additions & 6 deletions src/Rdd.Domain/Exceptions/UnauthorizedException.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Net;
using System.Runtime.Serialization;

namespace Rdd.Domain.Exceptions
{
Expand All @@ -12,11 +11,6 @@ public UnauthorizedException(string message)
{
}

private UnauthorizedException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}

public override HttpStatusCode StatusCode => HttpStatusCode.Unauthorized;
}
}
6 changes: 0 additions & 6 deletions src/Rdd.Domain/Exceptions/UnsupportedContentTypeException.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Net;
using System.Runtime.Serialization;

namespace Rdd.Domain.Exceptions
{
Expand All @@ -12,11 +11,6 @@ public UnsupportedContentTypeException(string message)
{
}

private UnsupportedContentTypeException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}

public override HttpStatusCode StatusCode => HttpStatusCode.UnsupportedMediaType;
}
}
8 changes: 4 additions & 4 deletions src/Rdd.Domain/Rdd.Domain.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ProjectGuid>{64D838DB-55D3-4F2E-8EDB-CF1866B3939B}</ProjectGuid>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Primitives" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Primitives" Version="8.0.0" />
<PackageReference Include="NExtends" Version="2.3.2" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0" />
</ItemGroup>

</Project>
3 changes: 0 additions & 3 deletions src/Rdd.Infra/Exceptions/QueryBuilderException.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Rdd.Domain.Exceptions;
using System;
using System.Net;
using System.Runtime.Serialization;

namespace Rdd.Infra.Exceptions
{
Expand All @@ -12,7 +11,5 @@ public sealed class QueryBuilderException : BusinessException

public QueryBuilderException(string message) : base(message) { }
public QueryBuilderException(string message, Exception innerException) : base(message, innerException) { }

private QueryBuilderException(SerializationInfo info, StreamingContext context) : base(info, context) { }
}
}
6 changes: 3 additions & 3 deletions src/Rdd.Infra/Rdd.Infra.csproj
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ProjectGuid>{ED772E81-78BC-4126-8A4F-CB6EAFA72A4D}</ProjectGuid>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.10" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Rdd.Domain\Rdd.Domain.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0" />
</ItemGroup>

</Project>
12 changes: 6 additions & 6 deletions src/Rdd.Web/Rdd.Web.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ProjectGuid>{35EB26DD-BF14-4B20-A644-9E566F51EA76}</ProjectGuid>
</PropertyGroup>

<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" Version="3.1.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="6.0.12" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.12" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<FrameworkReference Include="Microsoft.AspNetCore.App" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="8.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.10" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
</ItemGroup>

<ItemGroup>
Expand All @@ -19,6 +19,6 @@
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0" />
</ItemGroup>
</Project>
6 changes: 3 additions & 3 deletions src/Rdd.Z.EntityFramework/Rdd.Z.EntityFramework.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="Z.EntityFramework.Plus.EFCore" Version="6.18.1" />
<PackageReference Include="Z.EntityFramework.Plus.EFCore" Version="8.103.6" />
</ItemGroup>

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

<ItemGroup>
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0" />
</ItemGroup>

</Project>
5 changes: 3 additions & 2 deletions test/Rdd.Domain.Tests/AbstractEntityTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Rdd.Domain.Tests.Models;
using Rdd.Infra.Storage;
using System.Linq;
using System.Threading.Tasks;
using Xunit;

namespace Rdd.Domain.Tests
Expand All @@ -23,7 +24,7 @@ public ConcreteClassThreeCollection(IRepository<ConcreteClassThree> repository)
public class AbstractEntityTests
{
[Fact]
public async void NonAbstractCollection_SHOULD_return_all_entities_WHEN_GetAll_is_called()
public async Task NonAbstractCollection_SHOULD_return_all_entities_WHEN_GetAll_is_called()
{
var rightsService = new OpenRightExpressionsHelper<ConcreteClassThree>();
var storage = new InMemoryStorageService();
Expand All @@ -40,7 +41,7 @@ public async void NonAbstractCollection_SHOULD_return_all_entities_WHEN_GetAll_i
}

[Fact]
public async void AbstractCollection_SHOULD_return_all_entities_WHEN_GetAll_is_called()
public async Task AbstractCollection_SHOULD_return_all_entities_WHEN_GetAll_is_called()
{
var rightsService = new OpenRightExpressionsHelper<AbstractClass>();
var storage = new InMemoryStorageService();
Expand Down
39 changes: 0 additions & 39 deletions test/Rdd.Domain.Tests/ExceptionTests.cs

This file was deleted.

Loading

0 comments on commit bfb679c

Please sign in to comment.