You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using System.Runtime.Versioning;[SupportedOSPlatform("ios10.0")]staticclassProgram{publicstaticvoidMain(){
Some.Api1();// should warn}}[SupportedOSPlatform("ios10.0")][SupportedOSPlatform("tvos10.0")][SupportedOSPlatform("macos10.14")][SupportedOSPlatform("maccatalyst13.1")][UnsupportedOSPlatform("watchos")]classSome{[UnsupportedOSPlatform("watchos")][UnsupportedOSPlatform("tvos")][UnsupportedOSPlatform("macos")][SupportedOSPlatform("ios14.0")]publicstaticvoidApi1(){}}
Steps To Reproduce
Copy above code in env where CA1416 is enabled
Build it
Build occasionally fails/crashes
Expected behavior
Should see CA1416 warning
Actual behavior
Build sometimes crushes with AD0001 error
Analyzer 'Microsoft.NetCore.Analyzers.InteropServices.PlatformCompatibilityAnalyzer' threw an exception of type 'System.NullReferenceException' with message 'Object reference not set to an instance of an object.'.
buyaa-n
changed the title
Platform compatibility analyzer crushes for some platform attributes combinations
Platform compatibility analyzer crashes for some platform attributes combinations
Apr 12, 2022
Platform compatibility analyzer crashes for some platform attributes combinations
Diagnostic ID: CA1416:
Validate Platform compatibility
Analyzer source
SDK: Built-in CA analyzers in .NET 5 SDK or later
Version: Any version above SDK 5.0.100
Describe the bug
Test code to repro:
Steps To Reproduce
Expected behavior
Should see CA1416 warning
Actual behavior
Build sometimes crushes with AD0001 error
Related to dotnet/maui#823
The text was updated successfully, but these errors were encountered: