Target netstandard2.0 in OneOf.Extended #190
Open
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.
We enjoy using OneOf and are also using OneOf.Extended. Unfortunately, OneOf.Extended targets netstandard1.3, but not more recent versions, which introduce vulnerable transitive dependencies to consumers of our libraries.
Our libraries don't target netstandard1.3, but because netstandard1.3 is the highest version and is compatible with our .NET (Core) TFMs, it uses the netstandard1.3 build.
As a result, we're forced to include System.Net.Http as a direct nuget dependency to overwrite the version used.
Here's the .NET CLI reporting the vulnerable dependency:
This PR adds netstandard2.0 as a TFM which will fix the issue for consumers using netstandard2.0 or above.
output:
Update: I conditionally include a package reference to the vulnerable packages to set their minimum version only when building for netstandard1.3. (Also fixed in OneOf main). I can revert this change tho. Our customers don't use netstandard1.3, so building for 2.0 is sufficient for us.