You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to request support for targeting netstandard2.0 in the FluentValidation.AutoValidation.Mvc project so that it can work seamlessly in projects currently relying on AspNetCore libraries targeting older versions of the framework such as NET472.
For context, we have a large solution today with a couple of projects that use various Microsoft.AspNetCore.Mvc.*v2.2.0 and v2.3.0 packages targeting NET472. While we do have the intention of migrating those projects to modern .NET (8 and upwards), we won't be able to perform this upgrade right now.
At the same time, we would like to be able to upgrade our dependencies to modern versions, one of which is our FluentValidation dependency. We are currently using FluentValidationv10 (we created a temporary port of FluentValidation.AspNetCore that targets netstandard2.0 to make that work), but to be able to move to v11 we need support for automatic async validation, which v11 removed.
To completely eliminate our dependency on FluentValidation.AspNetCore, we would like to use FluentValidation.AutoValidation.Mvc instead. However, your library currently doesn't support netstandard2.0, and thus we are stuck.
I cloned the repository and made what I believe would be a "quick" job of supporting netstandard2.0 here for reference:
Removed support for ValidationStrategy.Annotations and AutoValidateNeverAttribute as those were based on the new Endpoints model.
This could probably be changed to something else in the old framework and still be 100% compatible, but I just wanted to see if I could make the project build while targeting netstandard2.0
Removed support for ProblemDetailsFactory and used ValidationProblemDetails directly ProblemDetailsFactory was introduced in AspNetCore 3.0 so that one is unavailable. The simplified version for 2.x should work just fine however.
The text was updated successfully, but these errors were encountered:
Hi there! Thank you for your contributions. I don't plan on supporting netstandard2.0 in the foreseeable future. However, should enough people need this I am open to start supporting it.
I will keep this issue open to gather feedback from the community.
I'd like to request support for targeting
netstandard2.0
in theFluentValidation.AutoValidation.Mvc
project so that it can work seamlessly in projects currently relying on AspNetCore libraries targeting older versions of the framework such asNET472
.For context, we have a large solution today with a couple of projects that use various
Microsoft.AspNetCore.Mvc.*
v2.2.0
andv2.3.0
packages targetingNET472
. While we do have the intention of migrating those projects to modern .NET (8 and upwards), we won't be able to perform this upgrade right now.At the same time, we would like to be able to upgrade our dependencies to modern versions, one of which is our
FluentValidation
dependency. We are currently usingFluentValidation
v10
(we created a temporary port ofFluentValidation.AspNetCore
that targetsnetstandard2.0
to make that work), but to be able to move tov11
we need support for automatic async validation, which v11 removed.To completely eliminate our dependency on
FluentValidation.AspNetCore
, we would like to useFluentValidation.AutoValidation.Mvc
instead. However, your library currently doesn't supportnetstandard2.0
, and thus we are stuck.I cloned the repository and made what I believe would be a "quick" job of supporting
netstandard2.0
here for reference:netstandard2.0
sample #59I made a couple of compromises in there:
Removed support for
ValidationStrategy.Annotations
andAutoValidateNeverAttribute
as those were based on the new Endpoints model.This could probably be changed to something else in the old framework and still be 100% compatible, but I just wanted to see if I could make the project build while targeting
netstandard2.0
Removed support for
ProblemDetailsFactory
and usedValidationProblemDetails
directlyProblemDetailsFactory
was introduced in AspNetCore 3.0 so that one is unavailable. The simplified version for2.x
should work just fine however.The text was updated successfully, but these errors were encountered: