Skip to content

Commit

Permalink
add .net 8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
pwelter34 committed Nov 28, 2023
1 parent e3475b1 commit d57d802
Show file tree
Hide file tree
Showing 18 changed files with 65 additions and 59 deletions.
18 changes: 6 additions & 12 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Build
env:
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_ENVIRONMENT: github
ASPNETCORE_ENVIRONMENT: github
BUILD_PATH: '${{github.workspace}}/artifacts'
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
Expand Down Expand Up @@ -41,12 +42,12 @@ jobs:
with:
fetch-depth: 0

- name: Install .NET Core
- name: Install .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Restore Dependencies
run: dotnet restore
Expand All @@ -55,21 +56,14 @@ jobs:
run: dotnet build --no-restore --configuration Release

- name: Run Test
run: dotnet test --configuration Release --collect:"XPlat Code Coverage" --settings coverlet.runsettings

- name: Generate Coverage
uses: danielpalme/[email protected]
with:
reports: '${{github.workspace}}/test/*/TestResults/*/coverage.info'
targetdir: ${{env.BUILD_PATH}}
reporttypes: lcov
run: dotnet test --no-build --configuration Release --collect:"XPlat Code Coverage" --settings coverlet.runsettings

- name: Report Coverage
if: success()
uses: coverallsapp/github-action@v2
with:
file: artifacts/lcov.info
format: lcov
file: "${{github.workspace}}/test/*/TestResults/*/coverage.info"
format: lcov

- name: Create Packages
if: success() && github.event_name != 'pull_request'
Expand Down
2 changes: 1 addition & 1 deletion sample/Tracker/Tracker.Core/Data/Entities/Priority.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public Priority()
/// Gets or sets the navigation collection for entity <see cref="Task" />.
/// </summary>
/// <value>
/// The the navigation collection for entity <see cref="Task" />.
/// The navigation collection for entity <see cref="Task" />.
/// </value>
public virtual ICollection<Task> Tasks { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion sample/Tracker/Tracker.Core/Data/Entities/Role.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public Role()
/// Gets or sets the navigation collection for entity <see cref="UserRole" />.
/// </summary>
/// <value>
/// The the navigation collection for entity <see cref="UserRole" />.
/// The navigation collection for entity <see cref="UserRole" />.
/// </value>
public virtual ICollection<UserRole> UserRoles { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion sample/Tracker/Tracker.Core/Data/Entities/Status.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public Status()
/// Gets or sets the navigation collection for entity <see cref="Task" />.
/// </summary>
/// <value>
/// The the navigation collection for entity <see cref="Task" />.
/// The navigation collection for entity <see cref="Task" />.
/// </value>
public virtual ICollection<Task> Tasks { get; set; }

Expand Down
10 changes: 5 additions & 5 deletions sample/Tracker/Tracker.Core/Data/Entities/Task.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public Task()
/// Gets or sets the navigation property for entity <see cref="User" />.
/// </summary>
/// <value>
/// The the navigation property for entity <see cref="User" />.
/// The navigation property for entity <see cref="User" />.
/// </value>
/// <seealso cref="AssignedId" />
public virtual User? AssignedUser { get; set; }
Expand All @@ -155,7 +155,7 @@ public Task()
/// Gets or sets the navigation property for entity <see cref="Priority" />.
/// </summary>
/// <value>
/// The the navigation property for entity <see cref="Priority" />.
/// The navigation property for entity <see cref="Priority" />.
/// </value>
/// <seealso cref="PriorityId" />
public virtual Priority? Priority { get; set; }
Expand All @@ -164,7 +164,7 @@ public Task()
/// Gets or sets the navigation property for entity <see cref="Status" />.
/// </summary>
/// <value>
/// The the navigation property for entity <see cref="Status" />.
/// The navigation property for entity <see cref="Status" />.
/// </value>
/// <seealso cref="StatusId" />
public virtual Status Status { get; set; } = null!;
Expand All @@ -173,7 +173,7 @@ public Task()
/// Gets or sets the navigation property for entity <see cref="TaskExtended" />.
/// </summary>
/// <value>
/// The the navigation property for entity <see cref="TaskExtended" />.
/// The navigation property for entity <see cref="TaskExtended" />.
/// </value>
/// <seealso cref="Id" />
public virtual TaskExtended TaskExtended { get; set; } = null!;
Expand All @@ -182,7 +182,7 @@ public Task()
/// Gets or sets the navigation property for entity <see cref="Tenant" />.
/// </summary>
/// <value>
/// The the navigation property for entity <see cref="Tenant" />.
/// The navigation property for entity <see cref="Tenant" />.
/// </value>
/// <seealso cref="TenantId" />
public virtual Tenant Tenant { get; set; } = null!;
Expand Down
2 changes: 1 addition & 1 deletion sample/Tracker/Tracker.Core/Data/Entities/TaskExtended.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public TaskExtended()
/// Gets or sets the navigation property for entity <see cref="Task" />.
/// </summary>
/// <value>
/// The the navigation property for entity <see cref="Task" />.
/// The navigation property for entity <see cref="Task" />.
/// </value>
/// <seealso cref="TaskId" />
public virtual Task Task { get; set; } = null!;
Expand Down
2 changes: 1 addition & 1 deletion sample/Tracker/Tracker.Core/Data/Entities/Tenant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public Tenant()
/// Gets or sets the navigation collection for entity <see cref="Task" />.
/// </summary>
/// <value>
/// The the navigation collection for entity <see cref="Task" />.
/// The navigation collection for entity <see cref="Task" />.
/// </value>
public virtual ICollection<Task> Tasks { get; set; }

Expand Down
6 changes: 3 additions & 3 deletions sample/Tracker/Tracker.Core/Data/Entities/User.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,23 +165,23 @@ public User()
/// Gets or sets the navigation collection for entity <see cref="Task" />.
/// </summary>
/// <value>
/// The the navigation collection for entity <see cref="Task" />.
/// The navigation collection for entity <see cref="Task" />.
/// </value>
public virtual ICollection<Task> AssignedTasks { get; set; }

/// <summary>
/// Gets or sets the navigation collection for entity <see cref="UserLogin" />.
/// </summary>
/// <value>
/// The the navigation collection for entity <see cref="UserLogin" />.
/// The navigation collection for entity <see cref="UserLogin" />.
/// </value>
public virtual ICollection<UserLogin> UserLogins { get; set; }

/// <summary>
/// Gets or sets the navigation collection for entity <see cref="UserRole" />.
/// </summary>
/// <value>
/// The the navigation collection for entity <see cref="UserRole" />.
/// The navigation collection for entity <see cref="UserRole" />.
/// </value>
public virtual ICollection<UserRole> UserRoles { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion sample/Tracker/Tracker.Core/Data/Entities/UserLogin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public UserLogin()
/// Gets or sets the navigation property for entity <see cref="User" />.
/// </summary>
/// <value>
/// The the navigation property for entity <see cref="User" />.
/// The navigation property for entity <see cref="User" />.
/// </value>
/// <seealso cref="UserId" />
public virtual User? User { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions sample/Tracker/Tracker.Core/Data/Entities/UserRole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public UserRole()
/// Gets or sets the navigation property for entity <see cref="Role" />.
/// </summary>
/// <value>
/// The the navigation property for entity <see cref="Role" />.
/// The navigation property for entity <see cref="Role" />.
/// </value>
/// <seealso cref="RoleId" />
public virtual Role Role { get; set; } = null!;
Expand All @@ -50,7 +50,7 @@ public UserRole()
/// Gets or sets the navigation property for entity <see cref="User" />.
/// </summary>
/// <value>
/// The the navigation property for entity <see cref="User" />.
/// The navigation property for entity <see cref="User" />.
/// </value>
/// <seealso cref="UserId" />
public virtual User User { get; set; } = null!;
Expand Down
6 changes: 3 additions & 3 deletions sample/Tracker/Tracker.Core/Tracker.Core.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>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AutoMapper" Version="12.0.1" />
<PackageReference Include="FluentValidation" Version="11.7.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.10" />
<PackageReference Include="FluentValidation" Version="11.8.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions sample/Tracker/Tracker.Database/Tracker.Database.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand All @@ -15,9 +15,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="dbup-sqlserver" Version="5.0.8" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageReference Include="dbup-sqlserver" Version="5.0.37" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions sample/Tracker/Tracker.Scaffold/Tracker.Scaffold.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>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
Expand All @@ -12,7 +12,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion sample/Tracker/Tracker.Web/Tracker.Web.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<UserSecretsId>984ef0cf-2b22-4fd1-876d-e01499da4c1f</UserSecretsId>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

<ItemGroup>
<PackageReference Include="AssemblyMetadata.Generators" Version="1.1.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="MinVer" Version="4.3.0" PrivateAssets="All" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<RootNamespace>EntityFrameworkCore.Generator</RootNamespace>
<NoWarn>1591,EF1001</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.6.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.10" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="7.0.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.8.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.0" />
<PackageReference Include="YamlDotNet" Version="13.7.1" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.14" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="7.0.11" />
<PackageReference Include="Oracle.EntityFrameworkCore" Version="7.21.12" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.0" />
<PackageReference Include="Oracle.EntityFrameworkCore" Version="7.21.12" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.10" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="7.0.4" />
<PackageReference Include="Oracle.EntityFrameworkCore" Version="7.21.11" />
<PackageReference Include="YamlDotNet" Version="13.2.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<ToolCommandName>efg</ToolCommandName>
<PackAsTool>true</PackAsTool>
<NoWarn>1591,EF1001</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="4.0.2" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="7.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="4.1.0" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="dbup-sqlserver" Version="5.0.8" />
<PackageReference Include="FluentAssertions" Version="6.11.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.1" />
<PackageReference Include="xunit" Version="2.5.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0">
<PackageReference Include="dbup-sqlserver" Version="5.0.37" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down

0 comments on commit d57d802

Please sign in to comment.