Remove if-def from JSON ref file previously used to support linker attributes#41484
Remove if-def from JSON ref file previously used to support linker attributes#41484layomia merged 2 commits intodotnet:masterfrom
Conversation
| #if NETCOREAPP && !NETCOREAPP3_0 | ||
| private const System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MembersAccessedOnRead = System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties; | ||
| private const System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MembersAccessedOnWrite = System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties; | ||
| private const System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MembersAccessedOnRead = System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicFields; |
There was a problem hiding this comment.
Should this rather use the autogenerated format? (ie what you get when running /t:GenerateReferenceSource)
There was a problem hiding this comment.
It probably should. I ran /t:GenerateReferenceSource on the ref project in a follow up commit.
I'm sure you will, but remember that this will close that issue and we still want this to be cherry-picked into release branch so you'll have to reopen after merging to track that cherry-pick. |
Thanks 😃 I'll save myself the extra hop and say that this PR "addresses" that issue. |
|
/backport to release/5.0 |
|
Started backporting to release/5.0: https://github.com/dotnet/runtime/actions/runs/227939769 |
Addresses #40999. To close that issue, this PR needs to be ported to .NET 5.
Internal versions of the attributes are used instead. They've already been included in the ref project (done in #40185). System.Text.Json is the only assembly with this issue.
/t:GenerateReferenceSource.