Skip to content

FileStream.Handle is obsolete in .NET6 too. #7455

Closed

Activity

  1. added
    Pri3
    on Dec 4, 2021
  2. carlossanlop commented on Dec 5, 2021

    @carlossanlop
    Contributor

    Hello @iwkjosec - .NET 6 shows in the list, it's the first item, so I'm not sure what is being reported here. Can you please clarify?

  3. svick commented on Dec 5, 2021

    @svick
    Member

    @carlossanlop The "Versions (Obsolete)" heading indicates that the property is obsolete in versions in italics and parentheses, but .Net 6 is not one of those.

    My guess is that this is related to the XML source for the page, which looks like this (simplified):

    <Attribute FrameworkAlternate="net-5.0;netcore-3.0;netcore-3.1;netstandard-2.1">
        <AttributeName Language="C#">[System.Obsolete("This property has been deprecated.  Please use FileStream's SafeFileHandle property instead.  https://go.microsoft.com/fwlink/?linkid=14202")]</AttributeName>
    </Attribute>
    <Attribute FrameworkAlternate="net-6.0">
        <AttributeName Language="C#">[System.Obsolete("FileStream.Handle has been deprecated. Use FileStream's SafeFileHandle property instead.")]</AttributeName>
    </Attribute>
    <Attribute FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0">
        <AttributeName Language="C#">[System.Obsolete("This property has been deprecated.  Please use FileStream's SafeFileHandle property instead.  http://go.microsoft.com/fwlink/?linkid=14202")]</AttributeName>
    </Attribute>
    <Attribute FrameworkAlternate="xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0">
        <AttributeName Language="C#">[System.Obsolete("Use SafeFileHandle instead")]</AttributeName>
    </Attribute>

    Notice that the property is obsolete in many frameworks, but only those in the first group are marked that way in the Applies to section.

  4. carlossanlop commented on Dec 5, 2021

    @carlossanlop
    Contributor

    Ah thanks for clarifying this, @svick.

    @gewarren @mimisasouvanh this looks like a bug in the way mdoc groups the obsolete frameworks.

    .NET 6 should be grouped with the others, not separate.

  5. svick commented on Dec 5, 2021

    @svick
    Member

    @carlossanlop I think it's because .Net 6 has a different description for the Obsolete attribute (see dotnet/runtime#56690). I'm not sure why .Net Core 2.0 and others are also listed separately.

  6. gewarren commented on Dec 6, 2021

    @gewarren
    Collaborator

    .netcore-2.0 and the others are listed separately because the info link is http:// instead of https://.

  7. gewarren commented on Dec 6, 2021

    @gewarren
    Collaborator
  8. added
    untriaged
    and removed on May 2, 2022
  9. jozkee commented on May 3, 2022

    @jozkee
    Member

    This is fixed now, I can see all .NET (core) versions in italics and paretheses. Thanks @mimisasouvanh @gewarren.

  10. ghost removed
    untriaged
    on May 3, 2022
  11. added
    untriaged
    and removed
    untriaged
    on May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Pri3area-System.IO

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions