Platform Specific Analyzer
Warning
This docs page is outdated and the Platform Specific Analyzers have been removed. Improvements are continually being made to the Visual Studio development experience, so please ensure you are on the latest version.
When writing version or platform adaptive code, the developers should ensure that code checks for presence of API before calling it. The platform specific analyzer is a Roslyn Analyzer that can parse through code and suggest fixes where appropriate.
Installation
The analyzer is available both as a nuget package
- References > Manage NuGet References > install Microsoft.Toolkit.Uwp.PlatformSpecificAnalyzer
Sample Output
The analyzer automatically kicks in when code is opened in Visual Studio and supports both C# and Visual Basic
C#
Visual Basic
Sample Project
You can see this in action in the Windows Community Toolkit Sample App.
Requirements
Device family | Universal, 10.0.16299.0 or higher |
---|---|
Namespace | Microsoft.Toolkit.Uwp.PlatformSpecificAnalyzer |
NuGet package | Microsoft.Toolkit.Uwp.PlatformSpecificAnalyzer |
API
Related Topics
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for