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

Upgrade to .net 8 #2176

Merged
merged 1 commit into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- main
- 9.x
- 10.x
- 11.x
pull_request:
branches:
- main
Expand All @@ -29,6 +30,7 @@ jobs:
uses: actions/setup-dotnet@v2
with:
dotnet-version: |
8.0.100
7.0.100
6.0.x

Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "7.0.100",
"version": "8.0.100",
"rollForward": "latestFeature"
}
}
4 changes: 2 additions & 2 deletions src/FluentValidation.Tests/FluentValidation.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<AssemblyName>FluentValidation.Tests</AssemblyName>
<RootNamespace>FluentValidation.Tests</RootNamespace>
<IsPackable>false</IsPackable>
Expand All @@ -16,7 +16,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<PackageReference Include="Microsoft.TestPlatform.TestHost" Version="16.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.ComponentModel.Annotations" Version="4.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
<PackageReference Include="xunit" Version="2.2.0" />
Expand Down
6 changes: 0 additions & 6 deletions src/FluentValidation/CompatibilitySuppressions.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:FluentValidation.Validators.PredicateValidator`2.Predicate.#ctor(System.Object,System.IntPtr)</Target>
<Left>lib/net6.0/FluentValidation.dll</Left>
<Right>lib/net7.0/FluentValidation.dll</Right>
</Suppression>
</Suppressions>
2 changes: 1 addition & 1 deletion src/FluentValidation/FluentValidation.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net5.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard2.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
<Description>A validation library for .NET that uses a fluent interface to construct strongly-typed validation rules.</Description>
<PackageReleaseNotes>
FluentValidation 11 is a major release. Please read the upgrade guide at https://docs.fluentvalidation.net/en/latest/upgrading-to-11.html
Expand Down
6 changes: 6 additions & 0 deletions src/FluentValidation/ValidationException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,16 @@ public ValidationException(string message, IEnumerable<ValidationFailure> errors
return "Validation failed: " + string.Join(string.Empty, arr);
}

#if NET8_0_OR_GREATER
[Obsolete(DiagnosticId = "SYSLIB0051")]
#endif
public ValidationException(SerializationInfo info, StreamingContext context) : base(info, context) {
Errors = info.GetValue("errors", typeof(IEnumerable<ValidationFailure>)) as IEnumerable<ValidationFailure>;
}

#if NET8_0_OR_GREATER
[Obsolete(DiagnosticId = "SYSLIB0051")]
#endif
public override void GetObjectData(SerializationInfo info, StreamingContext context) {
if (info == null) throw new ArgumentNullException("info");

Expand Down