-
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
Enable the Platform Compatibility Analyzer and address warnings it introduces #41354
Comments
It'd be fine to enable the analyzer for master branch only and we'd backport fixes if there would be any. |
Overall 41 warnings found with local build, all looks valid warnings and should be suppressed if Overall 48 warnings found with |
@buyaa-n can you post instructions on how to recreate these lists so that if someone else picks this issue up, they'll be able to reproduce the list and test their work? |
Sure:
|
To resolve this, we should:
|
@jeffhandley is this work still planned for the 5.0 codebase? Should it be marked blocking? |
Update to the plan above based on the results of #41760: /cc @ericstj
|
This was resolved for 6.0.0 (master) with #41760. We will not port any of this into the 5.0 branches since no public API surface area was affected. |
We intend to merge the Platform Compatibility Analyzer into the .NET 5.0 RC1 SDK. When the updated version of the
NetAnalyzers
package is taken into thedotnet/runtime
repo that contains this analyzer, it will introduce build warnings. Those build warnings surface because:[SupportedOSPlatform]
and[UnsupportedOSPlatform]
attributes to many APIs nowBecause these warnings will occur, we are going to disable the analyzer in the
dotnet/runtime
repo before merging it into the SDK. Before we ship .NET 5.0 RC2 though, we want to re-enable the analyzer and address all of the warnings introduced.See #41209 for a draft PR where we updated the infrastructure to allow MSBuild properties for applying assembly-wide attributes. We should include that infrastructure work as part of this issue, including the detail of producing a build error if an assembly attempts to define both Supported and Unsupported platforms at the assembly-level.
The text was updated successfully, but these errors were encountered: