Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net8-upgrade #196

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1.x
6.0.x
8.0.x
- name: Run './build.cmd Ci'
run: ./build.cmd Ci
7 changes: 7 additions & 0 deletions .github/workflows/ci_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1.x
6.0.x
8.0.x
- name: Run './build.cmd CiPublish'
run: ./build.cmd CiPublish
env:
Expand Down
29 changes: 24 additions & 5 deletions Sieve.Sample/Sieve.Sample.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,36 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>netcoreapp3.1;net6.0;net8.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.14">
<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp3.1'">
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.*">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="3.1.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.*" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net6.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.*">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.*" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net8.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.*">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="3.1.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.*" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\SieveUnitTests\SieveUnitTests.csproj" />
<ProjectReference Include="..\Sieve\Sieve.csproj" />
Expand Down
2 changes: 2 additions & 0 deletions Sieve/Exceptions/SieveException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ public SieveException()
{
}

#if !NET8_0_OR_GREATER
protected SieveException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context)
{
}
#endif
}
}
2 changes: 2 additions & 0 deletions Sieve/Exceptions/SieveIncompatibleMethodException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ public SieveIncompatibleMethodException()
{
}

#if !NET8_0_OR_GREATER
protected SieveIncompatibleMethodException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context)
{
}
#endif
}
}
2 changes: 2 additions & 0 deletions Sieve/Exceptions/SieveMethodNotFoundException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ public SieveMethodNotFoundException()
{
}

#if !NET8_0_OR_GREATER
protected SieveMethodNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context)
{
}
#endif
}
}
12 changes: 10 additions & 2 deletions Sieve/Sieve.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFrameworks>netstandard2.1;net6.0;net8.0</TargetFrameworks>
<Description>Sieve is a simple, clean, and extensible framework for .NET Core that adds sorting, filtering, and pagination functionality out of the box. Most common use case would be for serving ASP.NET Core GET queries. Documentation available on GitHub: https://github.com/Biarity/Sieve/</Description>
<Authors>Biarity;Ashish Patel;Kevin Sommer</Authors>

Expand All @@ -21,10 +21,18 @@
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>

<ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='netstandard2.1'">
<PackageReference Include="Microsoft.CSharp" Version="4.4.1" />
<PackageReference Include="Microsoft.Extensions.Options" Version="2.0.0" />
<PackageReference Include="System.ComponentModel.Annotations" Version="4.4.1" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net6.0'">
<PackageReference Include="Microsoft.Extensions.Options" Version="6.0.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net8.0'">
<PackageReference Include="Microsoft.Extensions.Options" Version="6.0.0" />
</ItemGroup>

</Project>
30 changes: 23 additions & 7 deletions SieveUnitTests/SieveUnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,35 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>netcoreapp3.1;net6.0;net8.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="Microsoft.Extensions.Options" Version="2.0.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="xunit" Version="2.6.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="coverlet.collector" Version="6.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="1.3.0">
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp3.1'">
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net6.0'">
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net8.0'">
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
4 changes: 2 additions & 2 deletions build/Build.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Linq;
using System.Linq;
using GlobExpressions;
using Nuke.Common;
using Nuke.Common.CI;
Expand Down Expand Up @@ -34,7 +34,7 @@ class Build : NukeBuild

[GitRepository] readonly GitRepository GitRepository;

[GitVersion(Framework = "netcoreapp3.1")] readonly GitVersion GitVersion;
[GitVersion(Framework = "net6.0")] readonly GitVersion GitVersion;

[Solution] readonly Solution Solution;

Expand Down
6 changes: 3 additions & 3 deletions build/_build.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace></RootNamespace>
<NoWarn>CS0649;CS0169</NoWarn>
<NukeRootDirectory>..</NukeRootDirectory>
Expand All @@ -11,7 +11,7 @@

<ItemGroup>
<PackageReference Include="Nuke.Common" Version="5.1.1" />
<PackageDownload Include="GitVersion.Tool" Version="[5.6.7]" />
<PackageDownload Include="GitVersion.Tool" Version="[5.12.0]" />
</ItemGroup>

</Project>