You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Developers get warnings when they misuse [SupportedOSPlatform] or [UnsupportedOSPlatform] attributes #44914
Cost:MWork that requires one engineer up to 2 weeksPriority:1Work that is critical for the release, but we could probably ship withoutTeam:LibrariesUser StoryA single user-facing feature. Can be grouped under an epic.area-Metacode-analyzerMarks an issue that suggests a Roslyn analyzer
The Platform Compatibility Analyzer consumes [SupportedOSPlatform] and [UnsupportedOSPlatform] attributes to report diagnostics when APIs are referenced that are not supported on the targeted platforms. This analyzer and these attributes were introduced in .NET 5.0.
As our platforms expand in .NET 6.0, these attributes will need to be applied on many more APIs and in more complex scenarios. To ensure the attributes are applied correctly, we need to create new diagnostics for missing or invalid attributes.
Here are some examples of when diagnostics should get raised:
changed the title [-]Introduce diagnostics for missing or invalid [SupportedOSPlatform] and [UnsupportedOSPlatform] attributes[/-][+]Developers get warnings when they misuse [SupportedOSPlatform] or [UnsupportedOSPlatform] attributes[/+]on Nov 27, 2020
Thanks, @danmosemsft. At the time of creating this, @terrajobst and I were using zero-based priorities withinPriority:1 issues to indicate that the parent Priority:1 item is unsuccessful without its Priority:0 children. But making this Priority:1 will be cleaner for tracking.
Cost:MWork that requires one engineer up to 2 weeksPriority:1Work that is critical for the release, but we could probably ship withoutTeam:LibrariesUser StoryA single user-facing feature. Can be grouped under an epic.area-Metacode-analyzerMarks an issue that suggests a Roslyn analyzer
Activity
[-]Introduce diagnostics for missing or invalid [SupportedOSPlatform] and [UnsupportedOSPlatform] attributes[/-][+]Developers get warnings when they misuse [SupportedOSPlatform] or [UnsupportedOSPlatform] attributes[/+]danmoseley commentedon Jan 11, 2021
This should not be P0 I think as we don't "control" that priority level.
jeffhandley commentedon Jan 13, 2021
Thanks, @danmosemsft. At the time of creating this, @terrajobst and I were using zero-based priorities within
Priority:1issues to indicate that the parentPriority:1item is unsuccessful without itsPriority:0children. But making thisPriority:1will be cleaner for tracking.terrajobst commentedon Jan 14, 2021
Works for me :-)
My understanding is that you can use that priority but you need to explain to our directors why the product can't ship without them.
buyaa-n commentedon May 6, 2021
Consider warning for misuse of newly added
SupportedOSPlatformGuard and UnsupportedOSPlatformGuardattributesjeffhandley commentedon Jul 7, 2021
I'm closing this based on the original scope. We can file new issues to further improve this experience if needed.