No-op on target frameworks that are already annotated#49
Conversation
| ('$(TargetFrameworkIdentifier)' == '.NETStandard' AND $([System.Version]::Parse($(TargetFrameworkVersion.Substring(1)))) >= $([System.Version]::Parse('2.1'))) | ||
| OR ('$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND $([System.Version]::Parse($(TargetFrameworkVersion.Substring(1)))) >= $([System.Version]::Parse('3.0')))"> |
There was a problem hiding this comment.
Best I knew offhand, improvements welcome!
|
The main issue here is we don't actually want to no-op, because we still need to rewrite the reference assemblies to drop the attributes from #46. The removal itself is already implemented: Are the netstandard2.1 reference assemblies annotated? I was expecting them to have the attribute in place, but not have the nullable annotations. Could be wrong though. |
I am very scared. This is kind of like a hard fork then for anyone who uses this package. I'll do it if I have to but I really don't like it. My understanding was that this was only for when you can't use HashCode. |
Just tried it. They are not annotated, good catch. |
|
Closing because no_op is not a good branch name for the work that needs to be done. |
What if there's a csproj flag for this? |
Superseded by #59
Also fixes #38.
Tested on my Shouldly branch with two target frameworks temporarily appended:
Before, #38 was reproing. After, everything was as expected (annotation on only the first three).