Skip to content

Apply [SupportedOSPlatform] and [UnsupportedOSPlatform] annotations for new platforms in dotnet/runtime #44912

Closed

Description

@jeffhandley

In .NET 6.0, we will be adding support for new platforms including iOS, Android, macOS, iPadOS, and tvOS. As support for these platforms is enabled, we need to inform the Platform Compatibility Analyzer of which APIs are specific to those platforms and which APIs are unsupported on them.

To accomplish this, we need to apply [SupportedOSPlatform] and [UnsupportedOSPlatform] attributes throughout the .NET Libraries for these platforms.

We also need to ensure the SDK infers the appropriate <SupportedPlatform> items for projects targeting these platforms. This behavior already exists for Blazor apps where <SupportedPlatform Include="browser" /> is inferred.

Activity

  1. added
    untriaged
    on Nov 19, 2020
  2. Dotnet-GitSync-Bot commented on Nov 19, 2020

    @Dotnet-GitSync-Bot
    Collaborator

    I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

  3. added this to the 6.0.0 milestone on Nov 19, 2020
  4. added and removed
    untriaged
    on Nov 19, 2020
  5. marek-safar commented on Nov 19, 2020

    @marek-safar
    Contributor

    Is platform TFM superset of SupportedOSPlatformAttribute or is the expectation to still use it for such libraries?

  6. added
    Priority:0
    on Nov 19, 2020
  7. changed the title [-]Apply [SupportedOSPlatform] and [UnsupportedOSPlatform] annotations for new platforms[/-] [+]Apply [SupportedOSPlatform] and [UnsupportedOSPlatform] annotations for new platforms in dotnet/runtime[/+] on Nov 27, 2020
  8. jeffhandley commented on Dec 15, 2020

    @jeffhandley
    MemberAuthor

    Platform TFMs will result in automatic application of the [assembly:SupportedOSPlatform] attribute for the targeted platform. But we'll need to enable checking of our new platforms in the build, and we'll also need to apply attributes for any specific APIs that have platform dependencies.

  9. joperezr commented on Aug 5, 2021

    @joperezr
    Member

    @buyaa-n @jeffhandley is this one done?

  10. jeffhandley commented on Aug 5, 2021

    @jeffhandley
    MemberAuthor

    OperatingSystem.IsIOS API is problematic #53084 is still open but it's being tracked individually, so we can close this out.

  11. ghost locked as resolved and limited conversation to collaborators on Sep 7, 2021
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

    Priority:0area-Meta

    Type

    No type

    Projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions