JsonApiDotNetCore.Annotation for netstandard2.0
See original GitHub issueBefore coming to my request, let me first say how awesome the new stuff is that you have developed since we last talked. I love the source generators.
Now to my feature request . The context is that I want to create a separate project that:
- contains the model classes hat will have to be annotated with the
ResourceAttribute
, among others; and - targets
netstandard2.0
because it will also be required by one or more projects that are, unfortunately, bound to .NET Framework.
I thought that I could add the JsonApiDotNetCore.Annotations
package as a dependency to that model-related project. However, that NuGet package depends on net60
, which I can’t use for my model project for the reasons described above.
Doe the Annotations package have to depend on net60
or could this also target netstandard2.0
? In other words, is there a way you could provide a NuGet package that is useable from .NET Framework or netstandard2.0
?
Issue Analytics
- State:
- Created a year ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
JsonApiDotNetCore.Annotations 5.3.0
A framework for building JSON:API compliant REST APIs using .NET Core and Entity Framework Core. Includes support for Atomic Operations.
Read more >Fluent API for building the resource graph · Issue #776
This issue tracks the design of a fluent API for JsonApiDotNetCore. First, let's zoom out a bit and see what happens currently in...
Read more >Namespace JsonApiDotNetCore.Resources.Annotations
Used to expose a property on a resource class as a JSON:API attribute (https://jsonapi.org/format/#document-resource-object-attributes). EagerLoadAttribute.
Read more >JsonApiDotNetCore documentation
A framework for building JSON:API compliant REST APIs using .NET Core and Entity Framework Core. Includes support for Atomic Operations.
Read more >Class ResourceFieldAttribute
Assembly: JsonApiDotNetCore.Annotations.dll. Used to expose a property on a resource class as a JSON:API field (attribute or relationship).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@bkoelman, thanks for your reply and the hint. I’ll try your workaround.
You will likely be able to deal with the lack of
System.Diagnostics.CodeAnalysis.NotNullAttribute
by inserting the following in your codebase:The hard deadline is the release of .NET 7 in a few weeks. We’ll need to release something by then, JADNC won’t work as-is. I’m still experimenting to decide on the best approach. Without going into much details, it looks like its going to need some form of multi-targeting, likely conflicting with the multi-targeting in this PR.
This week I have time to spend on JADNC, my time is going to be limited in the weeks after that. If you and @maurei aren’t able to review open PRs soon, I’m going to have choose between merging without review or leaving it out on a case-by-case basis.
Now is your opportunity to influence how this is going to work and get it released so your project can make use of it. Once released, its unlikely we’re going to change it, because it may break existing users that have taken a dependency on it.
As a review usually goes back and forth a few times, I’d like to get the first pass of feedback before Wednesday end of day. Do you think that’s feasible?