-
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
Obsolete SuppressIldasmAttribute #40622
Comments
Tagging subscribers to this area: @ajcvickers |
Related / duplicate: #13341 |
Reopening this issue, as we need a work item to track obsoleting this specific API. |
I made a comment over here why I think this is a bad idea: #13341 (comment) |
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() { }
}
} |
@bartonjs What is the alternative for this feature then ? |
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. |
Edit by @GrabYourPitchforks: This issue tracks only obsoleting the attribute, not any other ildasm.exe work.
(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.
The text was updated successfully, but these errors were encountered: