Developers get warnings when they misuse [SupportedOSPlatform] or [UnsupportedOSPlatform] attributes #44914
Closed
2 tasks done
Labels
area-Meta
code-analyzer
Marks an issue that suggests a Roslyn analyzer
Cost:M
Work that requires one engineer up to 2 weeks
Priority:1
Work that is critical for the release, but we could probably ship without
Team:Libraries
User Story
A single user-facing feature. Can be grouped under an epic.
Milestone
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:
The text was updated successfully, but these errors were encountered: