Skip to content

Commit

Permalink
Merge pull request #61 from TeamStepping/dotnet-7
Browse files Browse the repository at this point in the history
Add .NET 7 support and upgrade packages
  • Loading branch information
gdlcf88 committed Jan 10, 2023
2 parents 6e9f7b3 + 1cf6b8d commit 053e872
Show file tree
Hide file tree
Showing 15 changed files with 30 additions and 24 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: NuGet/setup-nuget@v1.0.5
- uses: actions/setup-dotnet@master
- uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
dotnet-version: 7.0.x

- name: Read common.props
id: commonProps
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
dotnet-version: |
3.1.x
6.0.x
7.0.x
- name: Install dependencies
run: dotnet restore
Expand Down
13 changes: 7 additions & 6 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
<Project>
<PropertyGroup>

<GrpcVersion>2.48.0</GrpcVersion>
<GoogleProtobufVersion>3.21.6</GoogleProtobufVersion>
<GrpcVersion>2.51.0</GrpcVersion>
<GoogleProtobufVersion>3.21.12</GoogleProtobufVersion>

<EfCoreVersion>6.0.9</EfCoreVersion>
<EfCoreVersion>7.0.1</EfCoreVersion>
<EfCoreVersionForNet6>6.0.9</EfCoreVersionForNet6>
<EfCoreVersionForNetStandard21>5.0.17</EfCoreVersionForNetStandard21>

<DapperVersion>2.0.123</DapperVersion>
<MongoDbDriverVersion>2.17.1</MongoDbDriverVersion>
<MongoDbDriverVersion>2.18.0</MongoDbDriverVersion>
<Mongo2GoVersion>3.1.3</Mongo2GoVersion>

<NewtonsoftJsonVersion>13.0.1</NewtonsoftJsonVersion>
<NewtonsoftJsonVersion>13.0.2</NewtonsoftJsonVersion>

<MicrosoftPackagesVersion>6.0.*</MicrosoftPackagesVersion>
<MicrosoftPackagesVersion>3.1.*</MicrosoftPackagesVersion>
<MicrosoftNetTestSdkVersion>17.2.*</MicrosoftNetTestSdkVersion>

<DistributedLockCoreVersion>1.0.5</DistributedLockCoreVersion>
Expand Down
2 changes: 1 addition & 1 deletion common.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>1.0.0</Version>
<Version>1.1.0</Version>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<Authors>Stepping</Authors>
<Company>Stepping</Company>
Expand Down
2 changes: 1 addition & 1 deletion common.testing.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<TargetFrameworks>net6.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net7.0;net6.0;netcoreapp3.1</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>10.0</LangVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Import Project="..\..\common.props" />

<PropertyGroup>
<TargetFrameworks>net6.0;netstandard2.1</TargetFrameworks>
<TargetFrameworks>net7.0;net6.0;netstandard2.1</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace />
Expand All @@ -15,7 +15,8 @@

<ItemGroup>
<PackageReference Include="Dapper" Version="$(DapperVersion)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="$(EfCoreVersion)" Condition="'$(TargetFramework)' == 'net6.0'"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="$(EfCoreVersion)" Condition="'$(TargetFramework)' == 'net7.0'"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="$(EfCoreVersionForNet6)" Condition="'$(TargetFramework)' == 'net6.0'"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="$(EfCoreVersionForNetStandard21)" Condition="'$(TargetFramework)' == 'netstandard2.1'"/>
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Import Project="..\..\common.props" />

<PropertyGroup>
<TargetFrameworks>net6.0;netstandard2.1</TargetFrameworks>
<TargetFrameworks>net7.0;net6.0;netstandard2.1</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace />
Expand All @@ -14,7 +14,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="$(EfCoreVersion)" Condition="'$(TargetFramework)' == 'net6.0'" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="$(EfCoreVersion)" Condition="'$(TargetFramework)' == 'net7.0'" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="$(EfCoreVersionForNet6)" Condition="'$(TargetFramework)' == 'net6.0'" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="$(EfCoreVersionForNetStandard21)" Condition="'$(TargetFramework)' == 'netstandard2.1'" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Import Project="..\..\common.props" />

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net7.0;net6.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Import Project="..\..\common.props" />

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net7.0;net6.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<Import Project="..\..\common.testing.props"/>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="$(EfCoreVersion)" Condition="'$(TargetFramework)' == 'net6.0'"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="$(EfCoreVersion)" Condition="'$(TargetFramework)' == 'net7.0'"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="$(EfCoreVersionForNet6)" Condition="'$(TargetFramework)' == 'net6.0'"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="$(EfCoreVersionForNetStandard21)" Condition="'$(TargetFramework)' == 'netcoreapp3.1'"/>

<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNetTestSdkVersion)"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public async Task Should_Insert_Rollback_Success_If_Another_Transaction_Commit()

var task = Task.Run(async () =>
{
await using var scope = ServiceProvider.CreateAsyncScope();
using var scope = ServiceProvider.CreateScope();
var dbContext2 = scope.ServiceProvider.GetRequiredService<FakeSharedDbContext>();
var steppingDbContext2 = new EfCoreSteppingDbContext(dbContext2);
Expand Down Expand Up @@ -127,7 +127,7 @@ public async Task Should_Insert_Rollback_Success_If_Another_Transaction_Rollback

var task = Task.Run(async () =>
{
await using var scope = ServiceProvider.CreateAsyncScope();
using var scope = ServiceProvider.CreateScope();
var dbContext2 = scope.ServiceProvider.GetRequiredService<FakeSharedDbContext>();
var steppingDbContext2 = new EfCoreSteppingDbContext(dbContext2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public async Task Should_Insert_Rollback_Success_If_Another_Transaction_Commit()

barrierInfoModel.Reason = SteppingConsts.MsgBarrierReasonRollback;

await using var scope = ServiceProvider.CreateAsyncScope();
using var scope = ServiceProvider.CreateScope();
var client2 = new MongoClient(MongoDbFixture.ConnectionString);
var database2 = client2.GetDatabase(MongoDbTestConsts.Database);
var steppingDbContext2 =
Expand Down Expand Up @@ -128,7 +128,7 @@ public async Task Should_Insert_Rollback_Success_If_Another_Transaction_Rollback

barrierInfoModel.Reason = SteppingConsts.MsgBarrierReasonRollback;

await using var scope = ServiceProvider.CreateAsyncScope();
using var scope = ServiceProvider.CreateScope();
var client2 = new MongoClient(MongoDbFixture.ConnectionString);
var database2 = client2.GetDatabase(MongoDbTestConsts.Database);
var steppingDbContext2 =
Expand Down
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>
<TargetFrameworks>net7.0;net6.0</TargetFrameworks>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<Import Project="..\..\common.testing.props"/>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="$(EfCoreVersion)" Condition="'$(TargetFramework)' == 'net6.0'"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="$(EfCoreVersion)" Condition="'$(TargetFramework)' == 'net7.0'"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="$(EfCoreVersionForNet6)" Condition="'$(TargetFramework)' == 'net6.0'"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="$(EfCoreVersionForNetStandard21)" Condition="'$(TargetFramework)' == 'netcoreapp3.1'"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNetTestSdkVersion)"/>
<ProjectReference Include="..\..\src\Stepping.TmProviders.LocalTm.EfCore\Stepping.TmProviders.LocalTm.EfCore.csproj"/>
Expand Down
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>
<TargetFrameworks>net7.0;net6.0</TargetFrameworks>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
Expand Down

0 comments on commit 053e872

Please sign in to comment.