Community

Start a Thread


Notifications
Subscribe You’re not receiving notifications from this thread.

C# Code Environment is not working!

Feedback • Asked 11 months ago by Abi Learning

Abi Learning Commented on Dec 07, 2023:

I tried to solve couple of challenges in C# and every time I am getting the following exception:

Please assist.

Testhost process exited with error: Unhandled exception. System.Net.Sockets.SocketException (101): Network is unreachable
at System.Net.Sockets.Socket.BeginConnectEx(EndPoint remoteEP, Boolean flowContext, AsyncCallback callback, Object state)
at System.Net.Sockets.Socket.UnsafeBeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state, Boolean flowContext)
at System.Net.Sockets.Socket.BeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state)
at System.Net.Sockets.Socket.BeginConnect(IPAddress address, Int32 port, AsyncCallback requestCallback, Object state)
at System.Net.Sockets.TcpClient.BeginConnect(IPAddress address, Int32 port, AsyncCallback requestCallback, Object state)
at System.Net.Sockets.TcpClient.<>c.b_270(IPAddress targetAddess, Int32 targetPort, AsyncCallback callback, Object state)
at System.Threading.Tasks.TaskFactory1.FromAsyncImpl[TArg1,TArg2](Func5 beginMethod, Func2 endFunction, Action1 endAction, TArg1 arg1, TArg2 arg2, Object state, TaskCreationOptions creationOptions)
at System.Threading.Tasks.TaskFactory.FromAsyncTArg1,TArg2
at System.Threading.Tasks.TaskFactory.FromAsyncTArg1,TArg2
at System.Net.Sockets.TcpClient.ConnectAsync(IPAddress address, Int32 port)
at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.SocketClient.Start(String endPoint)
at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.TestRequestHandler.InitializeCommunication()
at Microsoft.VisualStudio.TestPlatform.TestHost.DefaultEngineInvoker.Invoke(IDictionary`2 argsDictionary)
at Microsoft.VisualStudio.TestPlatform.TestHost.Program.Run(String[] args)
at Microsoft.VisualStudio.TestPlatform.TestHost.Program.Main(String[] args)
. Please check the diagnostic logs for more information.
Test Run Aborted.

Jake from AlgoDaily Commented on Dec 20, 2023:

Hi Abi, this should be resolved -- can you confirm this is the case for you?