Skip to content

Commit

Permalink
Bumped project to .net8
Browse files Browse the repository at this point in the history
  • Loading branch information
TTA777 committed Jan 4, 2024
1 parent 8ab3271 commit fa9ed52
Show file tree
Hide file tree
Showing 17 changed files with 59 additions and 61 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/core-build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build and test solution

env:
DOTNET_VERSION: 6
DOTNET_VERSION: 8

on:
workflow_call:
Expand Down
2 changes: 1 addition & 1 deletion coffeecard/CoffeeCard.Common/CoffeeCard.Common.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ProjectGuid>33C1BE09-BD3A-4584-B195-C57B47B9063C</ProjectGuid>
</PropertyGroup>
<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions coffeecard/CoffeeCard.Generators/CoffeeCard.Generators.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.4.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.4.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.7.0" />
</ItemGroup>

</Project>
20 changes: 10 additions & 10 deletions coffeecard/CoffeeCard.Library/CoffeeCard.Library.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>
<LangVersion>8</LangVersion>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>default</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MailKit" Version="3.4.2" />
Expand All @@ -16,14 +16,14 @@
<PackageReference Include="Serilog.Settings.Configuration" Version="3.4.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.25.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.0.3" />
<PackageReference Include="TimeZoneConverter" Version="6.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.9" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="7.0.9" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CoffeeCard.Common\CoffeeCard.Common.csproj" />
Expand All @@ -36,4 +36,4 @@
<Compile Remove="Migrations\20191012125617_Initial - test.cs" />
<Compile Remove="Migrations\20191012125617_Initial - test.Designer.cs" />
</ItemGroup>
</Project>
</Project>
10 changes: 5 additions & 5 deletions coffeecard/CoffeeCard.MobilePay/CoffeeCard.MobilePay.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ProjectGuid>AFF9D584-58F4-4A8D-A6BF-515890A9A3EF</ProjectGuid>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="jose-jwt" Version="4.0.1" />
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.9" />
<PackageReference Include="Serilog.AspNetCore" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CoffeeCard.Common\CoffeeCard.Common.csproj" />
Expand Down
8 changes: 4 additions & 4 deletions coffeecard/CoffeeCard.Models/CoffeeCard.Models.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Nullable>enable</Nullable>
<LangVersion>default</LangVersion>
Expand All @@ -9,8 +9,8 @@
<ProjectReference Include="..\CoffeeCard.Common\CoffeeCard.Common.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="NJsonSchema" Version="10.8.0" />
<PackageReference Include="NJsonSchema" Version="11.0.0" />
<PackageReference Include="Microsoft.NETCore.Targets" Version="5.0.0" ExcludeAssets="all" PrivateAssets="all" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="7.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="8.0.0" />
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace CoffeeCard.Models.DataTransferObjects.v2.Purchase
/// }
/// </example>
[KnownType(typeof(FreePurchasePaymentDetails))]
[JsonConverter(typeof(JsonInheritanceConverter))]
[JsonConverter(typeof(JsonInheritanceConverter<PaymentDetails>))]
public class FreePurchasePaymentDetails : PaymentDetails
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace CoffeeCard.Models.DataTransferObjects.v2.Purchase
/// }
/// </example>
[KnownType(typeof(MobilePayPaymentDetails))]
[JsonConverter(typeof(JsonInheritanceConverter))]
[JsonConverter(typeof(JsonInheritanceConverter<PaymentDetails>))]
public class MobilePayPaymentDetails : PaymentDetails
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace CoffeeCard.Models.DataTransferObjects.v2.Purchase
{
[KnownType(typeof(MobilePayPaymentDetails))]
[KnownType(typeof(FreePurchasePaymentDetails))]
[JsonConverter(typeof(JsonInheritanceConverter))]
[JsonConverter(typeof(JsonInheritanceConverter<PaymentDetails>))]
public abstract class PaymentDetails
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ public static StatisticBuilder Simple()
{
var user = UserBuilder.Simple().Build();
return new StatisticBuilder()
.WithUser(user); ;
.WithUser(user);
}

public static StatisticBuilder Typical()
{
return Simple();
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<ItemGroup>
<ProjectReference Include="..\CoffeeCard.Generators\CoffeeCard.Generators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
<ProjectReference Include="..\CoffeeCard.Generators\CoffeeCard.Generators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\CoffeeCard.Models\CoffeeCard.Models.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="AutoBogus" Version="2.13.1" />
<PackageReference Include="AutoBogus.Conventions" Version="2.13.1" />
</ItemGroup>

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

</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
<LangVersion>8</LangVersion>
<ProjectGuid>81E81CE9-7DDA-4A9B-860B-6A473BC4F06F</ProjectGuid>
Expand All @@ -21,12 +21,12 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="7.0.9" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="7.0.9" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.9" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CoffeeCard.WebApi\CoffeeCard.WebApi.csproj" />
Expand Down
4 changes: 2 additions & 2 deletions coffeecard/CoffeeCard.Tests.Unit/CoffeeCard.Tests.Unit.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
<LangVersion>8</LangVersion>
<ProjectGuid>24274C8F-678F-4E4D-98A0-2899163BCCBA</ProjectGuid>
Expand All @@ -21,7 +21,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CoffeeCard.Library\CoffeeCard.Library.csproj" />
Expand Down
22 changes: 12 additions & 10 deletions coffeecard/CoffeeCard.WebApi/CoffeeCard.WebApi.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<LangVersion>8</LangVersion>
<ProjectGuid>5562C898-513F-493A-A335-417C39476714</ProjectGuid>
Expand Down Expand Up @@ -35,18 +35,20 @@
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.9" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="5.0.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="5.0.10" />
<PackageReference Include="NSwag.AspNetCore" Version="13.19.0" />
<PackageReference Include="NSwag.AspNetCore" Version="14.0.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.4.0" />
<PackageReference Include="Serilog.Sinks.ApplicationInsights" Version="4.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.25.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.9" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.9" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="7.0.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />

</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CoffeeCard.Common\CoffeeCard.Common.csproj" />
Expand All @@ -56,4 +58,4 @@
<ItemGroup>
<Folder Include="logs" />
</ItemGroup>
</Project>
</Project>
6 changes: 3 additions & 3 deletions coffeecard/CoffeeCard.WebApi/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ private static void GenerateOpenApiDocument(IServiceCollection services)
config.OperationProcessors.Add(new AspNetCoreOperationSecurityScopeProcessor("apikey"));

// Assume not null as default unless parameter is marked as nullable
config.DefaultReferenceTypeNullHandling = ReferenceTypeNullHandling.NotNull;
// config.DefaultReferenceTypeNullHandling = ReferenceTypeNullHandling.NotNull;
});
}
}
Expand All @@ -259,7 +259,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IApiVers
app.UseHsts();

app.UseOpenApi();
app.UseSwaggerUi3();
app.UseSwaggerUi();

app.UseHttpsRedirection();

Expand Down Expand Up @@ -288,4 +288,4 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IApiVers
}
}
#pragma warning restore CS1591
}
}
2 changes: 1 addition & 1 deletion coffeecard/CoffeeCardAPI.sln
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CoffeeCard.Models", "Coffee
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CoffeeCard.MobilePay.GenerateApi", "CoffeeCard.MobilePay.GenerateApi\CoffeeCard.MobilePay.GenerateApi.csproj", "{D295CCD7-DDB7-477D-82B6-53AFA97F5749}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CoffeeCard.Common.Test", "CoffeeCard.Tests.Common\CoffeeCard.Tests.Common.csproj", "{938E0AD9-C1C8-4C10-B9FB-DD279DAD4D0B}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CoffeeCard.Common.Test", "CoffeeCard.Tests.Common\CoffeeCard.Tests.Common.csproj", "{938E0AD9-C1C8-4C10-B9FB-DD279DAD4D0B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CoffeeCard.Generators", "CoffeeCard.Generators\CoffeeCard.Generators.csproj", "{BE332D7E-FD07-4878-B7E3-A06988F0C382}"
EndProject
Expand Down
6 changes: 3 additions & 3 deletions coffeecard/global.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"sdk": {
"version": "6.0.0",
"rollForward": "latestMajor",
"allowPrerelease": true
"version": "8.0.0",
"rollForward": "latestMinor",
"allowPrerelease": false
}
}

0 comments on commit fa9ed52

Please sign in to comment.