Skip to content

FriendAccessAllowedAttribute public? #10707

Closed

Description

@lukdr

Would it be possible to make the System.Runtime.CompilerServices.FriendAccessAllowedAttribute public, to be more explicit and clearly state intent of what exactly should be visible to a friend assembly?

Activity

  1. jkotas commented on Jul 18, 2018

    @jkotas
    Member

    dotnet/csharplang#1724

    This would need to be combined with enforcement in Roslyn or some other tool be actually useful.

  2. lukdr commented on Jul 18, 2018

    @lukdr
    Author

    Let me also add that InternalsVisibleToAttribute has a public bool AllInternalsVisible property which is supposed to be used together with FriendAccessAllowedAttribute as mentioned in the summary:

    ///     If AllInternalsVisible is not true for a friend assembly, the FriendAccessAllowed attribute
    ///     indicates which internals are shared with that friend assembly.
    

    This is not possible as the latter is internal.

  3. jkotas commented on Jul 18, 2018

    @jkotas
    Member

    This comment is left-over from the times when we have experimented with this in .NET Framework. .NET Core does not use it - we did not like the complexity associated with it.

    The official documentation just says that this is not implemented.

  4. lukdr commented on Jul 18, 2018

    @lukdr
    Author

    Thanks for the clarification, still it would be nice to have a more explicit and targeted way of making things visible to friend assemblies. This seemed like a possibility, as it is already used on some internal types in mscorlib.

  5. jkotas commented on May 24, 2019

    @jkotas
    Member

    This attribute is gone from CoreCLR and mscorlib.

    dotnet/csharplang#1724 tracks the language feature that this is really about.

  6. transferred this issue fromdotnet/coreclron Jan 31, 2020
  7. added this to the Future milestone on Jan 31, 2020
  8. ghost locked as resolved and limited conversation to collaborators on Dec 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions