Multi-target Annotations against .NET Standard 1.0 #1192
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds netstandard1.0 as a TFM to the
JsonApiDotNetCore.Annotations
NuGet package. This enables consumers to share their models project with .NET Framework code.The types in the NetStandard target don't actually work with JsonApiDotNetCore. This is provided solely for convenience so that consumers don't need to use conditional defines that are based on the target framework.
Internally, we use project-level conditionals to include/exclude source files per target framework, based on their file name:
*.shared.cs
: Included for both targets*.netstandard.cs
: Only included for netstandard1.0 (added asNone
for .NET 6 so it shows up in the IDE)*.cs
: Only included for .NET 6This approach avoids the use of
#if ... #else ... #endif
in our source files, which is problematic for Resharper CleanupCode.Closes #1190.
QUALITY CHECKLIST