title: Error :StreamJsonRpc.ConnectionLostException: The JSON-RPC connection with the remote party was lost before the request could complete
body: <p>My unit tests disappear from TestExplorer of visual Studio 2019 16.3.5</p>
  
  <p>The output from test engine is:</p>
  
  <pre><code>[16/10/2019 6:45:48.705  Error] StreamJsonRpc.ConnectionLostException: The JSON-RPC connection with the remote party was lost before the request could complete.
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
     at StreamJsonRpc.JsonRpc.&lt;InvokeCoreAsync&gt;d__92`1.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.VisualStudio.TestWindow.Client.ClientSession.&lt;InitializeConnectionAsync&gt;d__43.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.VisualStudio.TestWindow.Extensibility.TaskExtensions.&lt;WithExceptionLogger&gt;d__0.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
  [16/10/2019 6:45:48.728  Error] StreamJsonRpc.ConnectionLostException: The JSON-RPC connection with the remote party was lost before the request could complete. ---&gt; System.OperationCanceledException: The operation was canceled.
     at System.Threading.CancellationToken.ThrowOperationCanceledException()
     at StreamJsonRpc.MessageHandlerBase.&lt;WriteAsync&gt;d__15.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at StreamJsonRpc.JsonRpc.&lt;TransmitAsync&gt;d__113.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at System.Threading.Tasks.ValueTask.ThrowIfCompletedUnsuccessfully()
     at StreamJsonRpc.JsonRpc.&lt;InvokeCoreAsync&gt;d__92`1.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
     --- End of inner exception stack trace ---
     at StreamJsonRpc.JsonRpc.&lt;InvokeCoreAsync&gt;d__92`1.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.VisualStudio.TestWindow.Client.ClientSession.&lt;OpenAsync&gt;d__48.MoveNext()
  [16/10/2019 6:45:48.730  Error] StreamJsonRpc.ConnectionLostException: The JSON-RPC connection with the remote party was lost before the request could complete. ---&gt; System.OperationCanceledException: The operation was canceled.
     at System.Threading.CancellationToken.ThrowOperationCanceledException()
     at StreamJsonRpc.MessageHandlerBase.&lt;WriteAsync&gt;d__15.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at StreamJsonRpc.JsonRpc.&lt;TransmitAsync&gt;d__113.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at System.Threading.Tasks.ValueTask.ThrowIfCompletedUnsuccessfully()
     at StreamJsonRpc.JsonRpc.&lt;InvokeCoreAsync&gt;d__92`1.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
  --- End of stack trace from previous location where exception was thrown ---
     at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
     --- End of inner exception stack trace ---
     at StreamJsonRpc.JsonRpc.&lt;InvokeCoreAsync&gt;d__92`1.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.VisualStudio.TestWindow.Client.ClientSession.&lt;OpenAsync&gt;d__48.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.VisualStudio.TestWindow.Controller.OpenOperation.&lt;ExecuteInternal&gt;d__10.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.VisualStudio.TestWindow.Controller.Operation.&lt;&lt;Execute&gt;b__37_0&gt;d.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.VisualStudio.TestWindow.Extensibility.ILoggerExtensions.&lt;CallWithCatchAsync&gt;d__10`1.MoveNext()
  [16/10/2019 6:45:54.706  Error] StreamJsonRpc.ConnectionLostException: The JSON-RPC connection with the remote party was lost before the request could complete. ---&gt; System.OperationCanceledException: The operation was canceled.
     at System.Threading.CancellationToken.ThrowOperationCanceledException()
     at StreamJsonRpc.MessageHandlerBase.&lt;WriteAsync&gt;d__15.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at StreamJsonRpc.JsonRpc.&lt;TransmitAsync&gt;d__113.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at System.Threading.Tasks.ValueTask.ThrowIfCompletedUnsuccessfully()
     at StreamJsonRpc.JsonRpc.&lt;InvokeCoreAsync&gt;d__92`1.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
     --- End of inner exception stack trace ---
     at StreamJsonRpc.JsonRpc.&lt;InvokeCoreAsync&gt;d__92`1.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.VisualStudio.TestWindow.Client.ClientSession.&lt;&gt;c__DisplayClass57_0.&lt;&lt;GetAllTestSources&gt;b__0&gt;d.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.VisualStudio.TestWindow.Client.ClientSession.&lt;CallOnBackgroundThreadWithProgressAsync&gt;d__59`1.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.VisualStudio.TestWindow.Client.TestContainer.TestContainerProvider.&lt;SyncContainersAsync&gt;d__45.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.VisualStudio.TestWindow.Client.TestContainer.TestContainerProvider.&lt;RefreshContainersAsync&gt;d__44.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.VisualStudio.TestWindow.Controller.OperationBroker.&lt;TriggerAutoDiscoveryAsync&gt;d__20.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.VisualStudio.TestWindow.Controller.OperationBroker.&lt;&gt;c__DisplayClass19_0.&lt;&lt;OnSolutionOpened&gt;b__0&gt;d.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.VisualStudio.TestWindow.Extensibility.ILoggerExtensions.&lt;CallWithCatchAsync&gt;d__9.MoveNext()
  [16/10/2019 6:47:49.853  Error] StreamJsonRpc.ConnectionLostException: The JSON-RPC connection with the remote party was lost before the request could complete. ---&gt; System.OperationCanceledException: The operation was canceled.
     at System.Threading.CancellationToken.ThrowOperationCanceledException()
     at StreamJsonRpc.MessageHandlerBase.&lt;WriteAsync&gt;d__15.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at StreamJsonRpc.JsonRpc.&lt;TransmitAsync&gt;d__113.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at System.Threading.Tasks.ValueTask.ThrowIfCompletedUnsuccessfully()
     at StreamJsonRpc.JsonRpc.&lt;InvokeCoreAsync&gt;d__92`1.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
     --- End of inner exception stack trace ---
     at StreamJsonRpc.JsonRpc.&lt;InvokeCoreAsync&gt;d__92`1.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.VisualStudio.TestWindow.Client.ClientSession.&lt;&gt;c__DisplayClass55_0.&lt;&lt;RemoveTestSourcesAsync&gt;b__0&gt;d.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.VisualStudio.TestWindow.Client.ClientSession.&lt;CallOnBackgroundThreadWithProgressAsync&gt;d__60.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
     at Microsoft.VisualStudio.TestWindow.Controller.DiscoveryOperation.&lt;DetectChangedContainers&gt;d__8.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.VisualStudio.TestWindow.Controller.DiscoveryOperation.&lt;StartDiscoverTestsAsync&gt;d__11.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.VisualStudio.TestWindow.Controller.Operation.&lt;&lt;Execute&gt;b__37_0&gt;d.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.VisualStudio.TestWindow.Extensibility.ILoggerExtensions.&lt;CallWithCatchAsync&gt;d__10`1.MoveNext()
  [16/10/2019 6:48:49.563  Error] StreamJsonRpc.ConnectionLostException: The JSON-RPC connection with the remote party was lost before the request could complete. ---&gt; System.OperationCanceledException: The operation was canceled.
     at System.Threading.CancellationToken.ThrowOperationCanceledException()
     at StreamJsonRpc.MessageHandlerBase.&lt;WriteAsync&gt;d__15.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at StreamJsonRpc.JsonRpc.&lt;TransmitAsync&gt;d__113.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at System.Threading.Tasks.ValueTask.ThrowIfCompletedUnsuccessfully()
     at StreamJsonRpc.JsonRpc.&lt;InvokeCoreAsync&gt;d__92`1.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
     --- End of inner exception stack trace ---
     at StreamJsonRpc.JsonRpc.&lt;InvokeCoreAsync&gt;d__92`1.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.VisualStudio.TestWindow.Client.ClientSession.&lt;CallOnBackgroundThreadWithProgressAsync&gt;d__60.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.VisualStudio.TestWindow.Client.ClientSession.&lt;InitializeExtensionsAsync&gt;d__50.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.VisualStudio.TestWindow.Core.Controller.TestPlatformExtensionManager.&lt;&gt;c__DisplayClass9_0.&lt;&lt;InitializeExtensions&gt;b__1&gt;d.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()
     at Microsoft.VisualStudio.TestWindow.Core.Controller.TestPlatformExtensionManager.InitializeExtensions(Boolean skipNonManagedTestExtensions)
     at Microsoft.VisualStudio.TestWindow.Controller.Request.OnBeforeExecuteRequest()
     at Microsoft.VisualStudio.TestWindow.Controller.Request.Start()
     at Microsoft.VisualStudio.TestWindow.Controller.Operation.&lt;ExecuteRequestAsync&gt;d__35.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.VisualStudio.TestWindow.Controller.DiscoveryOperation.&lt;StartDiscoverTestsAsync&gt;d__11.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.VisualStudio.TestWindow.Controller.Operation.&lt;&lt;Execute&gt;b__37_0&gt;d.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.VisualStudio.TestWindow.Extensibility.ILoggerExtensions.&lt;CallWithCatchAsync&gt;d__10`1.MoveNext()
  </code></pre>
  
  <p>All projects in the solution are build under <code>framework 4.8</code>
  All have <code>Any Cpu</code> as <code>Platform Target</code>. 
  Not as <code>32-bit prefer</code> option active.
  I have x64 arquitecture selected for tests.
  There is no testFile settings in use. </p>
  
  <p>I try rebuild, clean rebuild, resinstall VS, nothing work. I can't find out what this error is.</p>