dotnet / platform-compat

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

Flagging Socket.Connect as not support on Linux and macOS #222

Open paul-777 opened 4 years ago

paul-777 commented 4 years ago

I don't understand why it flags elements from the .NetCore main implementation as "isn't supported on Linux and macOS" in this case the Socket.Connect method. Surely the point is that the main .Net Core api is supported on all platforms and that platform specific functionality went elsewhere. Looking at the .Net Core source the method doesn't throw a PlatformNotSupportedException?

Additionally there are other cases like use of PerformanceCounters from the compatibility pack which it doesn't detect as problems.