You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is in support of dotnet/linker#988 - see the spec there for motivation.
We need a way to selectively suppress warnings about linker-unfriendly patterns.
This attribute is largely inspired by SuppressMessageAttribute (that unfortunately cannot be used because it's marked [Conditional] under a condition that we wouldn't expect to enable when the linker runs).
We should position it as a peer to SuppressMessageAttribute, UnconditionalSuppressMessageAttribute
It should be System.Diagnostics.CodeAnalysis
The behavior is the same, except it's not marked [Conditonal] and thus will always remain in metadata
We considered establishing an inheritance relationshop with SuppressMessageAttribute but concluded we don't need it (neither for docs nor for consumption)
namespaceSystem.Diagnostics.CodeAnalysis{[AttributeUsage(AttributeTargets.All,Inherited=false,AllowMultiple=true)]publicsealedclassUnconditionalSuppressMessageAttribute:Attribute{// Same API as SuppressMessageAttribute}}
Activity
MichalStrehovsky commentedon Apr 23, 2020
Cc @vitek-karas
terrajobst commentedon Apr 23, 2020
Video
SuppressMessageAttribute,UnconditionalSuppressMessageAttributeSystem.Diagnostics.CodeAnalysis[Conditonal]and thus will always remain in metadataSuppressMessageAttributebut concluded we don't need it (neither for docs nor for consumption)eerhardt commentedon Apr 28, 2020
Closed in #35387.