For the code below I was expecting to get a System.Net.Sockets.SocketException, however for a .NET Core 2.2 project it throws a System.Net.Internals.SocketExceptionFactory+ExtendedSocketException:
classProgram{staticasyncTaskMain(){Console.WindowWidth=132;try{awaitConnectClientAsync();}catch(Exceptione){Console.WriteLine($"Caught exception {e.GetType()}.{Environment.NewLine}{e.Message}.");}Console.WriteLine("Press any key to end.");Console.ReadKey();}privatestaticasyncTaskConnectClientAsync(){TcpClienttcpClient=newTcpClient();awaittcpClient.ConnectAsync(IPAddress.Loopback,54321).ConfigureAwait(false);}}For a .NET Framework 4.7.2 project the same code throws the expected System.Net.Sockets.SocketException.
This issue appears to be similar to 20744, 29081, 30073.
For the code below I was expecting to get a System.Net.Sockets.SocketException, however for a .NET Core 2.2 project it throws a System.Net.Internals.SocketExceptionFactory+ExtendedSocketException:
For a .NET Framework 4.7.2 project the same code throws the expected System.Net.Sockets.SocketException.
This issue appears to be similar to 20744, 29081, 30073.