Replies: 4 comments 2 replies
-
|
Hi @AvremelM Currently, Facet does NOT support .NET Framework or .NET Standard 2.0 projects for consuming applications, even though the analyzer itself targets netstandard2.0. The generated code uses As per Microsofts recommendation, I would probably choose the path of focusing on modern .NET stacks. Do you feel there is a need for Facet to have a broader enterprise legacy reach? Accepting such a PR though would indeed validate current compatibility issues |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the clarification. A few points I hope you'll consider:
(Facet.Mappings is blocked by If the intent is to remain modern-only, clearly documenting the effective minimum runtime (net8+ ?) in both the README and the Nuget package would prevent confusion. But if you're open to the idea, I'm genuinely willing to contribute a PR that:
This approach would maintain the current experience for modern targets while enabling legacy platform support, without adding runtime dependencies. Would you be open to reviewing such a PR? I understand if the answer is no, but I wanted to make the case that there's real value here, and that the majority of Facet's functionality is 99% there already. |
Beta Was this translation helpful? Give feedback.
-
|
OK so you made a pretty convincing case there, can be implemented at low cost and provides a sulotion for a legitimate use case. I lean toward accepting this proposal. Technical implementation sounds good, and it does remove the confusing mismatch between analyzer target and runtime reqs. Are you willing to maintain the support for NET framework? Thanks for your time and efforts already! |
Beta Was this translation helpful? Give feedback.
-
|
Thank you!
Sure. I'm certainly happy to maintain/contribute if and when this makes it in. I realized there was an unresolved question in the Tests project (which I confess I didn't consider thoroughly enough before, despite getting it running and tests passing locally).
Problem: Right now there are lots of things in the Tests project that need extra polyfills to compile for net472 (e.g., Random.Shared). Possible solutions (ordered from least to most effort/robustness):
I'd probably lean toward 3 or 4, as they seem the most 'correct' to me. But if you have a different preference or want to explicitly rule out some of these options, please share. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Note
This is only about
Facet,Facet.Attributes, andFacet.Extensions, but NOTFacet.MappingsorFacet.Extensions.EFCore.*While
FacetandFacet.Attributestarget .NET Standard 2.0, it's not made clear anywhere if the generated code will compile/run in an application/library targeting .NET Framework or .NET Standard.(
Facet.Extensionstargets only .NET8+, but some experimentation seems to indicate that it could easily target .NET Framework too. Of note, theFacet.Testsproject targets only .NET10.)So:
ReferenceEqualityComparer,IsExternalInit.net472;net10.0be accepted?Facet.Mappings.*andFacet.Extensions.EFCore.*would not be run for that target)Edit: Pushed a proof of concept commit/branch. All tests building and passing (excluding those in
UnitTests\Extensions\EFCoreandUnitTests\Extensions\Mapping)Beta Was this translation helpful? Give feedback.
All reactions