Handle issue “PlatformNotSupportedException” for HttpClientHandler.SslProtocol in .netstandard2.0 project

  Kiến thức lập trình

I have .netstandard2.0 project which is used by two projects. One is .net core project and one is .netframework4.7.1. I’m getting “PlatformNotSupportedException” for HttpClientHandler.SslProtocol while referring my .Netstandard2.0 project in .netframework4.7.1. I know it is not supported in .netframework4.7.1.But I want to skip that code .netframework4.7.1 and don’t skip in .netcore.How can I handle this in .netstansard2.0.
I don’t have access to both .netframework4.7.1 and .net core.I have access only to .netstandard2.0 where the “HttpClientHandler.SslProtocol” using. I could do anything in .netframework4.7.1 and .net core. What I can do in .netstandard2.0?

LEAVE A COMMENT