Skip to content

Commit

Permalink
Support .NET7
Browse files Browse the repository at this point in the history
Updated test projects target framework to include .NET7
Updated Lamar dependency version range
  • Loading branch information
cheng93 authored and jeremydmiller committed Nov 11, 2022
1 parent ec535a8 commit 706e35a
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 57 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ jobs:
- uses: actions/checkout@v2


- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,37 +1,44 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>net5.0;net6.0;net7.0</TargetFrameworks>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="[5.0.0,5.9.0)" />
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="[5.0.0,5.9.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="[5.0.0,5.9.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="[5.0.0,5.9.0)" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="[5.0.0,5.9.0)" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="[5.0.0,5.9.0)" />
<PackageReference Include="Shouldly" Version="3.0.0" />
<PackageReference Include="xunit" Version="2.4.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
<PackageReference Include="coverlet.collector" Version="1.0.1" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="[5.0.0,6.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="[5.0.0,6.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="[5.0.0,6.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="[5.0.0,6.0.0)" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="[5.0.0,6.0.0)" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="[5.0.0,6.0.0)" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="[6.0.0,6.9.0)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="[6.0.0,6.9.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="[6.0.0,6.9.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="[6.0.0,6.9.0)" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="[6.0.0,6.9.0)" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="[6.0.0,6.9.0)" />
<PackageReference Include="Shouldly" Version="3.0.0" />
<PackageReference Include="xunit" Version="2.4.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
<PackageReference Include="coverlet.collector" Version="1.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="[6.0.0,7.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="[6.0.0,7.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="[6.0.0,7.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="[6.0.0,7.0.0)" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="[6.0.0,7.0.0)" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="[6.0.0,7.0.0)" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="[7.0.0,8.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="[7.0.0,8.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="[7.0.0,8.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="[7.0.0,8.0.0)" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="[7.0.0,8.0.0)" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="[7.0.0,8.0.0)" />
</ItemGroup>

<ItemGroup>
Expand Down
18 changes: 9 additions & 9 deletions src/Lamar.AspNetCoreTests/Lamar.AspNetCoreTests.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>net5.0;net6.0;net7.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>

<PackageReference Include="App.Metrics.AspNetCore.Mvc" Version="4.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI" Version="5.0.1" />

<PackageReference Include="IdentityServer4" Version="4.1.2" />
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.1" />

<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.7" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.7" />
Expand All @@ -24,18 +26,16 @@
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0' ">
<PackageReference Include="AspNetCore.HealthChecks.UI" Version="5.0.1" />
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.HealthChecks" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.HealthChecks" Version="1.0.0" />
<PackageReference Include="Baseline" Version="3.2.2" />
<PackageReference Include=" Microsoft.Extensions.Diagnostics.HealthChecks" Version="5.0.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="AspNetCore.HealthChecks.UI" Version="5.0.1" />
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.HealthChecks" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.HealthChecks" Version="1.0.0" />
<PackageReference Include="Alba" Version="6.0.0" />
<PackageReference Include=" Microsoft.Extensions.Diagnostics.HealthChecks" Version="6.0.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0' ">
<PackageReference Include="Alba" Version="6.0.0" />
<PackageReference Include=" Microsoft.Extensions.Diagnostics.HealthChecks" Version="7.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
11 changes: 2 additions & 9 deletions src/Lamar.Testing/Lamar.Testing.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>net5.0;net6.0;net7.0</TargetFrameworks>
<LangVersion>10.0</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.2" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
Expand All @@ -25,14 +26,6 @@
<ProjectReference Include="..\Widget.Registration\Widget.Registration.csproj" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0' ">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
</ItemGroup>

<ItemGroup>
<Compile Remove="Codegen\StubGeneratedMethod.cs" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Lamar/Lamar.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@

<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="[6.0.0, 7.0.0)" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="[6.0.0, 8.0.0)" />
</ItemGroup>
</Project>
10 changes: 1 addition & 9 deletions src/LamarCompiler.Testing/LamarCompiler.Testing.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>net5.0;net6.0;net7.0</TargetFrameworks>
<LangVersion>10.0</LangVersion>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand All @@ -12,14 +12,6 @@
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
<PackageReference Include="Shouldly" Version="3.0.2" />
<PackageReference Include="NSubstitute" Version="4.2.1" />
<PackageReference Include="Baseline" Version="2.1.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0' ">
<PackageReference Include="Baseline" Version="2.1.1" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="Baseline" Version="2.1.1" />
</ItemGroup>

Expand Down
11 changes: 2 additions & 9 deletions src/LamarWithAspNetCore3/LamarWithAspNetCore3.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>net5.0;net6.0;net7.0</TargetFrameworks>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Baseline" Version="2.1.1" />
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="xunit" Version="2.4.0" />
Expand All @@ -20,14 +21,6 @@
<ProjectReference Include="..\StructureMap.Testing.Widget\StructureMap.Testing.Widget.csproj" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0' ">
<PackageReference Include="Baseline" Version="2.1.1" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="Baseline" Version="2.1.1" />
</ItemGroup>

<ItemGroup>
<None Update="appsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down
2 changes: 1 addition & 1 deletion src/MinimalApiTests/MinimalApiTests.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>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
Expand Down

0 comments on commit 706e35a

Please sign in to comment.