Platform Specific Analyzer

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.


The analyzer is available both as a nuget package

Sample Output

The analyzer automatically kicks in when code is opened in Visual Studio and supports both C# and Visual Basic

C# Code Analysis

Code Analysis

Visual Basic Code Analysis

Code Analysis


Device family Universal, 10.0.15063.0 or higher
Namespace Microsoft.Toolkit.Uwp.PlatformSpecificAnalyzer
NuGet package Microsoft.Toolkit.Uwp.PlatformSpecificAnalyzer

API Source Code