-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Developers can follow documentation to resolve Platform Compatibility warnings #44919
Comments
I talked with @terrajobst about this story and we agreed that we’re not yet to a point where we can confidently define the fixer behaviors. As we have applied more platform annotations throughout the runtime, we’ve been iterating on the patterns and practices we apply. Before we build the fixer, we should:
Thereafter, we can define which fixes this code fixer would offer in which scenarios, and then implement it. Based on this status, I’m removing this story from scope for 6.0. But we will meet those preconditions above before 6.0 ships, allowing us to plan the fixer work. |
Original issue description
The Platform Compatibility Analyzer was introduced in .NET 5.0, raising new diagnostics when APIs are referenced that are unsupported on targeted platforms. These diagnostic messages result in build warnings, but there are no corresponding code fixers in place to automatically address the warnings or illustrate how to do so. Instead, developers must turn to the documentation for the analyzer and the
CA1416
diagnostic ID to determine how to handle the warnings.There are multiple ways to handle the warnings, and each of these could be supplied a possible fixer.
When developers encounter warnings from the Platform Compatibility analyzer, they can be uncertain which approach is best for resolving the warnings. To aide them we will collect our own best practices and document how we've decided to use each remediation approach in our own code base.
The text was updated successfully, but these errors were encountered: