Skip to content

Commit

Permalink
Update Nugets and update to .NET 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Socolin committed Mar 31, 2024
1 parent a40c578 commit bde15b4
Show file tree
Hide file tree
Showing 26 changed files with 83 additions and 70 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
working-directory: backend
Expand Down
2 changes: 1 addition & 1 deletion backend/.run/DbMigrator - Rollback.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
<option name="PROJECT_KIND" value="DotNetCore" />
<option name="PROJECT_TFM" value="net7.0" />
<option name="PROJECT_TFM" value="net8.0" />
<method v="2">
<option name="Build" />
</method>
Expand Down
2 changes: 1 addition & 1 deletion backend/.run/DbMigrator.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="0" />
<option name="PROJECT_KIND" value="DotNetCore" />
<option name="PROJECT_TFM" value="net7.0" />
<option name="PROJECT_TFM" value="net8.0" />
<method v="2">
<option name="Build" />
</method>
Expand Down
81 changes: 40 additions & 41 deletions backend/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,57 +3,56 @@
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="AspNetCore.HealthChecks.MySql" Version="6.0.2" />
<PackageVersion Include="AspNetCore.HealthChecks.Redis" Version="6.0.4" />
<PackageVersion Include="AutoMapper" Version="12.0.0" />
<PackageVersion Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.0" />
<PackageVersion Include="CliWrap" Version="3.6.0" />
<PackageVersion Include="FluentAssertions" Version="6.8.0" />
<PackageVersion Include="FluentMigrator" Version="3.3.2" />
<PackageVersion Include="FluentMigrator.Runner" Version="3.3.2" />
<PackageVersion Include="FluentMigrator.Runner.MySql" Version="3.3.2" />
<PackageVersion Include="FluentValidation" Version="11.4.0" />
<PackageVersion Include="FluentValidation.AspNetCore" Version="11.2.2" />
<PackageVersion Include="JetBrains.Annotations" Version="2022.3.1" />
<PackageVersion Include="AspNetCore.HealthChecks.MySql" Version="8.0.0" />
<PackageVersion Include="AspNetCore.HealthChecks.Redis" Version="8.0.0" />
<PackageVersion Include="AutoMapper" Version="13.0.1" />
<PackageVersion Include="CliWrap" Version="3.6.6" />
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
<PackageVersion Include="FluentMigrator" Version="5.2.0" />
<PackageVersion Include="FluentMigrator.Runner" Version="5.2.0" />
<PackageVersion Include="FluentMigrator.Runner.MySql" Version="5.2.0" />
<PackageVersion Include="FluentValidation" Version="11.9.0" />
<PackageVersion Include="FluentValidation.AspNetCore" Version="11.3.0" />
<PackageVersion Include="JetBrains.Annotations" Version="2023.3.0" />
<PackageVersion Include="JUnitTestLogger4GitHub" Version="1.1.1" />
<PackageVersion Include="JsonModelBinder" Version="2.1.1" />
<PackageVersion Include="Magick.NET-Q8-x64" Version="12.2.2" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.1" />
<PackageVersion Include="Magick.NET-Q8-x64" Version="13.6.0" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.3" />
<PackageVersion Include="Microsoft.AspNetCore.SignalR" Version="1.1.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="7.0.1" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="7.0.1" />
<PackageVersion Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="7.0.1" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.1" />
<PackageVersion Include="Microsoft.Extensions.Configuration.CommandLine" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageVersion Include="MySql.Data" Version="8.0.31" />
<PackageVersion Include="NSubstitute" Version="4.4.0" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.3.1" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.2" />
<PackageVersion Include="Nunit" Version="3.13.3" />
<PackageVersion Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0-silver.1" />
<PackageVersion Include="Sentry" Version="3.25.0" />
<PackageVersion Include="Sentry.AspNetCore" Version="3.25.0" />
<PackageVersion Include="Sentry.Serilog" Version="3.25.0" />
<PackageVersion Include="Serilog" Version="2.12.0" />
<PackageVersion Include="Serilog.AspNetCore" Version="6.1.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="8.0.3" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.3" />
<PackageVersion Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="8.0.3" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Configuration.CommandLine" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageVersion Include="MySql.Data" Version="8.3.0" />
<PackageVersion Include="NSubstitute" Version="5.1.0" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="Nunit" Version="4.1.0" />
<PackageVersion Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.2" />
<PackageVersion Include="Sentry" Version="4.2.1" />
<PackageVersion Include="Sentry.AspNetCore" Version="4.2.1" />
<PackageVersion Include="Sentry.Serilog" Version="4.2.1" />
<PackageVersion Include="Serilog" Version="3.1.1" />
<PackageVersion Include="Serilog.AspNetCore" Version="8.0.1" />
<PackageVersion Include="Serilog.Exceptions" Version="8.4.0" />
<PackageVersion Include="Serilog.Extensions.Logging" Version="3.1.0" />
<PackageVersion Include="Serilog.Formatting.Compact" Version="1.1.0" />
<PackageVersion Include="Serilog.Settings.Configuration" Version="3.4.0" />
<PackageVersion Include="Serilog.Sinks.Console" Version="4.1.0" />
<PackageVersion Include="Serilog.Extensions.Logging" Version="8.0.0" />
<PackageVersion Include="Serilog.Formatting.Compact" Version="2.0.0" />
<PackageVersion Include="Serilog.Settings.Configuration" Version="8.0.0" />
<PackageVersion Include="Serilog.Sinks.Console" Version="5.0.1" />
<PackageVersion Include="Serilog.Sinks.RollingFile" Version="3.3.0" />
<PackageVersion Include="Socolin.TestUtils.FakeSmtp" Version="1.0.3" />
<PackageVersion Include="Socolin.TestUtils.JsonComparer" Version="1.15.1" />
<PackageVersion Include="Socolin.TestUtils.JsonComparer.NUnitExtensions" Version="1.15.1" />
<PackageVersion Include="Socolin.TestUtils.JsonComparer" Version="1.16.0" />
<PackageVersion Include="Socolin.TestUtils.JsonComparer.NUnitExtensions" Version="1.16.0" />
<PackageVersion Include="SpecFlow" Version="3.9.74" />
<PackageVersion Include="SpecFlow.NUnit" Version="3.9.74" />
<PackageVersion Include="SpecFlow.NUnit.Runners" Version="3.9.74" />
<PackageVersion Include="SpecFlow.Tools.MsBuild.Generation" Version="3.9.74" />
<PackageVersion Include="jose-jwt" Version="4.1.0" />
<PackageVersion Include="Spectre.Console" Version="0.45.0" />
<PackageVersion Include="Spectre.Console" Version="0.48.0" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion backend/src/Naheulbook.Core/Naheulbook.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion backend/src/Naheulbook.Data/Naheulbook.Data.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion backend/src/Naheulbook.Requests/Naheulbook.Requests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion backend/src/Naheulbook.Shared/Naheulbook.Shared.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

Expand Down
3 changes: 1 addition & 2 deletions backend/src/Naheulbook.Web/Naheulbook.Web.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.MySql" />
<PackageReference Include="AspNetCore.HealthChecks.Redis" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" />
<PackageReference Include="FluentValidation.AspNetCore" />
<PackageReference Include="jose-jwt" />
<PackageReference Include="JsonModelBinder" />
Expand Down
2 changes: 1 addition & 1 deletion backend/src/Naheulbook.Web/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static async Task Main(string[] args)
options.ListenUnixSocket(unixSocketPath);
})
.UseKestrel()
.UseSentry(o => o.BeforeSend = DefaultSentryEventExceptionProcessor.BeforeSend)
.UseSentry(o => o.AddExceptionProcessorProvider(() => [new DefaultSentryEventExceptionProcessor()]))
.UseConfiguration(configuration)
.UseStartup<Startup>();
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,18 @@
using System.Reflection;
using Newtonsoft.Json;
using Sentry;
using Sentry.Extensibility;

namespace Naheulbook.Web.Sentry;

public static class DefaultSentryEventExceptionProcessor
public class DefaultSentryEventExceptionProcessor : ISentryEventExceptionProcessor
{
public static SentryEvent BeforeSend(SentryEvent sentryEvent)
public void Process(Exception exception, SentryEvent sentryEvent)
{
if (sentryEvent.Exception != null)
{
FlattenException(sentryEvent.Exception, sentryEvent, "__exceptionData");
}

return sentryEvent;
}

private static void FlattenException(Exception exception, SentryEvent sentryEvent, string key)
Expand Down
2 changes: 1 addition & 1 deletion backend/src/Naheulbook.Web/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void ConfigureServices(IServiceCollection services)
services.AddDistributedMemoryCache();
}

services.AddAutoMapper(typeof(RequestToEntityProfile).Assembly, typeof(Startup).Assembly);
services.AddAutoMapper(typeof(RequestToEntityProfile), typeof(Startup));

services.AddScoped(servicesProvider => servicesProvider.GetRequiredService<IHttpContextAccessor>().HttpContext!.GetExecutionContext());
services.AddScoped(servicesProvider => servicesProvider.GetRequiredService<IHttpContextAccessor>().HttpContext!.GetIfExistsExecutionContext());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand All @@ -19,4 +19,8 @@
<ProjectReference Include="..\Socolin.TestUtils.AutoFillTestObjects\Socolin.TestUtils.AutoFillTestObjects.csproj" />
</ItemGroup>

<ItemGroup>
<PackageVersion Update="nunit" Version="4.1.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand All @@ -20,4 +20,8 @@
<ProjectReference Include="..\Naheulbook.TestUtils\Naheulbook.TestUtils.csproj" />
</ItemGroup>

<ItemGroup>
<PackageVersion Update="nunit" Version="4.1.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

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

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand All @@ -18,4 +18,8 @@
<ProjectReference Include="..\..\src\Naheulbook.Web\Naheulbook.Web.csproj" />
</ItemGroup>

<ItemGroup>
<PackageVersion Update="nunit" Version="4.1.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand All @@ -17,4 +17,8 @@
<ProjectReference Include="..\Socolin.TestUtils.AutoFillTestObjects\Socolin.TestUtils.AutoFillTestObjects.csproj" />
</ItemGroup>

<ItemGroup>
<PackageVersion Update="nunit" Version="4.1.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion backend/tools/scripts/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3.9"
services:
naheulbook_dev_env_mysql:
image: mariadb:10.9
image: mariadb:11.3.2
environment:
MYSQL_ROOT_PASSWORD: naheulbook
ports:
Expand Down

0 comments on commit bde15b4

Please sign in to comment.