Added DynamicallyAccessedMembers metadata#4
Added DynamicallyAccessedMembers metadata#4simon-curtis wants to merge 1 commit intospectreconsole:mainfrom
Conversation
|
@microsoft-github-policy-service agree |
|
@phil-scott-78 Could you take a look at this? |
|
I'll dig in tomorrow. I remember a debate a while back about maybe this working, but the team wanting it to stay with it only applying to Trimming so I didn't think it was ever done. Is this working in VS or is it the Rider/R# analysis? |
|
This is working in Rider, I don't use VS so I can't say if it works there too. |
|
huh, looks like last year they updated how their inspection works with DAM - https://youtrack.jetbrains.com/issue/RSRP-498196/DynamicallyAccessedMembers-attribute-not-taken-into-account-when-class-does-not-have-explicit-constructor But I'm not sure we want to use that by-product to get the warning to go away. While I agree that this attribute should be on there for trimming support, I'm not sure what the impact would be on people using AOT and trimming right now, even unsupported. It should work, but my experience trying to get the Cli library to support AOT has been that a small change like that can really ripple a bunch of warnings at publish time very quickly. That being said, when working through some documentation, I had the urge to update the Jetbrains ExternalAnnotations with Let me think about this. Open to other ideas too |
Purely nice to have, added DynamicallyAccessedMembers metadata to remove the
Class 'x' is never instantiateddiagnostic is supressed