dotnet / platform-compat

Roslyn analyzer that finds usages of APIs that will throw PlatformNotSupportedException on certain platforms.
MIT License
278 stars 43 forks source link

Consider checking for UWP SDK-specific and platform-specific APIs #34

Open martinsuchan opened 7 years ago

martinsuchan commented 7 years ago

It would be nice if this analyzer had similar functionality as the Platform Specific Analyzer, that is no longer updated - checking for UWP APIs available only on specific device type or in newer SDK even though the app has TargetPlatformMinVersion lower, for instance:

<TargetPlatformVersion>10.0.15063.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.14393.0</TargetPlatformMinVersion>

The Platform Specific Analyzer does not support checks in Anniversary Update or newer SDKs.

terrajobst commented 7 years ago

Agreed. @pjanotti and I discussed this earlier and concluded that we'd like to handle target frameworks as well (.NET Framework, .NET Core, UWP etc). We currently only handle OS.

martinsuchan commented 7 years ago

Related issue in UWP Community Toolkit: Add Platform specific analyzer to DeveloperTools https://github.com/Microsoft/UWPCommunityToolkit/issues/1497 Development efforts should be definitely focused on one place, Can't say which one is the better right now.