Skip to content

Obsolete SuppressIldasmAttribute #40622

Closed

Description

@teo-tsirpanis

Edit by @GrabYourPitchforks: This issue tracks only obsoleting the attribute, not any other ildasm.exe work.

namespace System.Runtime.CompilerServices
{
    [Obsolete("SuppressIldasmAttribute has no effect in .NET 6.0+ applications.")] // NEW attribute
    [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module)]
    public sealed class SuppressIldasmAttribute : Attribute
    {
        public SuppressIldasmAttribute() { }
    }
}

(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.

Activity

  1. added
    untriaged
    on Aug 10, 2020
  2. vcsjones commented on Aug 10, 2020

    @vcsjones
    Member

    Related / duplicate: #13341

  3. ghost locked as resolved and limited conversation to collaborators on Dec 7, 2020
  4. changed the title [-]Idea: deprecate the SuppressIldasmAttribute[/-] [+]Obsolete SuppressIldasmAttribute[/+] on Apr 7, 2021
  5. unlocked this conversation on Apr 7, 2021
  6. GrabYourPitchforks commented on Apr 7, 2021

    @GrabYourPitchforks
    Member

    Reopening this issue, as we need a work item to track obsoleting this specific API.

  7. added
    api-ready-for-review
    and removed
    untriaged
    on Apr 7, 2021
  8. added this to the 6.0.0 milestone on Apr 7, 2021
  9. ghost added
    in-pr
    on Apr 8, 2021
  10. dotMorten commented on Apr 9, 2021

    @dotMorten

    I made a comment over here why I think this is a bad idea: #13341 (comment)

  11. bartonjs commented on May 18, 2021

    @bartonjs
    Member

    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() { }
        }
    }
  12. added
    api-approved
    and removed
    api-ready-for-review
    on May 18, 2021
  13. ghost removed
    in-pr
    on May 19, 2021
  14. dotMorten commented on May 19, 2021

    @dotMorten

    @bartonjs What is the alternative for this feature then ?
    image

  15. GrabYourPitchforks commented on May 19, 2021

    @GrabYourPitchforks
    Member

    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.

  16. ghost locked as resolved and limited conversation to collaborators on Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

api-approvedarea-System.Runtime.CompilerServices

Type

No type

Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions