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
Edit by @GrabYourPitchforks: This issue tracks only obsoleting the attribute, not any other ildasm.exe work.
namespaceSystem.Runtime.CompilerServices{[Obsolete("SuppressIldasmAttribute has no effect in .NET 6.0+ applications.")]// NEW attribute[AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Module)]publicsealedclassSuppressIldasmAttribute:Attribute{publicSuppressIldasmAttribute(){}}}
(What text do we even put there? "This attribute never made any sense to begin with and has no valid use case."? I've based the text proposed above on the DisablePrivateReflectionAttribute obsoletion text already in 6.0.)
It has no valid use case, the security against reverse engineering it provides is nonexistent and there are tons of tools that ignore it.
My proposal is to deprecate it per #33360 and modify ILDasm to stop honoring that attribute.
Approved as proposed, but use the next available diagnostic ID.
namespace System.Runtime.CompilerServices
{
+ [Obsolete("SuppressIldasmAttribute has no effect in .NET 6.0+ applications.")]
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module)]
public sealed class SuppressIldasmAttribute : Attribute
{
public SuppressIldasmAttribute() { }
}
}
There is no alternative. During API review we briefly touched on whether we want to rip out support entirely or require a "/force" switch. The conclusion was that .NET (which includes the BCL and SDK tools such as ildasm.exe) should simply drop all support.
Nothing in this proposal or in the merged PR prevents other disassemblers (such as Visual Studio) from continuing to honor the attribute. Those disassemblers can abort the operation, display a warning, or implement any other behavior that might be appropriate for their scenarios.
ghost locked as resolved and limited conversation to collaborators on Jun 18, 2021
Activity
vcsjones commentedon Aug 10, 2020
Related / duplicate: #13341
[-]Idea: deprecate the SuppressIldasmAttribute[/-][+]Obsolete SuppressIldasmAttribute[/+]GrabYourPitchforks commentedon Apr 7, 2021
Reopening this issue, as we need a work item to track obsoleting this specific API.
dotMorten commentedon Apr 9, 2021
I made a comment over here why I think this is a bad idea: #13341 (comment)
bartonjs commentedon May 18, 2021
Video
Approved as proposed, but use the next available diagnostic ID.
namespace System.Runtime.CompilerServices { + [Obsolete("SuppressIldasmAttribute has no effect in .NET 6.0+ applications.")] [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module)] public sealed class SuppressIldasmAttribute : Attribute { public SuppressIldasmAttribute() { } } }dotMorten commentedon May 19, 2021
@bartonjs What is the alternative for this feature then ?

GrabYourPitchforks commentedon May 19, 2021
There is no alternative. During API review we briefly touched on whether we want to rip out support entirely or require a "/force" switch. The conclusion was that .NET (which includes the BCL and SDK tools such as ildasm.exe) should simply drop all support.
Nothing in this proposal or in the merged PR prevents other disassemblers (such as Visual Studio) from continuing to honor the attribute. Those disassemblers can abort the operation, display a warning, or implement any other behavior that might be appropriate for their scenarios.