-
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 verify their NuGet dependencies compatibility against specific target platform #44920
Comments
@marek-safar and @bruno-garcia -- Do you have any specific scenarios in mind that can be used as acceptance criteria for this story? At present, this is vaguely defined and low-confidence; specific scenarios would help. |
We have several major scenarios which would benefit from this support greatly and we could come up with more as this can have quite a broad impact. A few major ones
All of them would benefit from running compact analyzers for all pieces they deploy than for just parts they built from sources. |
In order to study this further, we need to define some concrete scenarios for usage and expectations.
@terrajobst @marek-safar -- @buyaa-n and I don't know the answers to these questions. Is the following what you had in mind, or were you thinking of something different?
|
There are multiple scenarios you could build on top of the original requirements. However, the core one is very simple. A developer is building Blazor/Win/Apple/etc. app and adds a dependency to NuGet to help him solve some of his problems. The NuGet is added to the project and builds successfully. The developer keeps working on the code and after few more iterations, the app suddenly throws PNSE. After some time spent the developer finds out that NuGet is targetting net6.0 but it's not compatible with Blazor/Win/Apple target and has to remove the library and rewrite the code written to use a different library or approach. |
@cathysull, FYI this is not gonna make the cut for .NET 6. |
AB#1255325
The Platform Compatibility Analyzer was introduced in .NET 5.0, raising new diagnostics when APIs are referenced that are unsupported on targeted platforms. At present, this analysis can only be performed as part of compilation, providing an experience for identifying unsupported API calls within the IDE or during a build.
The projects which benefit most from the annotations are large scale solutions with many dependencies which are usually not available as a source code implementation. If the same analysis performed by the Platform Compatibility Analyzer could be performed against binaries, we could further improve the impact of this tooling. The analysis could potentially be integrated with the .NET Portability Analyzer as well, helping those seeking to migrate from .NET Framework to identify not only which APIs are and are not available in .NET 5.0+, but which of those APIs were Windows-specific.
The text was updated successfully, but these errors were encountered: