-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove if-def from JSON ref file previously used to support linker attributes #41484
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this rather use the autogenerated format? (ie what you get when running /t:GenerateReferenceSource
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
.