Could not start visual studio due to an error - StreamJsonRpc.ConnectionLostException

Dylan Baird 36 Reputation points
2021-03-13T20:55:55.207+00:00

Good afternoon,

I am primarily a Linux user but am excited by some of the GUI features of Visual Studio. Unfortunately I am unable to open Visual Studio. I downloaded the most recent installer and was able to install it without trouble. It will not open and throws the exception mentioned in the title.

The only other information is that it states "The JSON-RPC connection with the remote party was lost before the request could complete."

I'm not sure what connection it is trying to initiate and I have no idea how to go about debugging the IDE... Through the installer I tried repairing the installation which did not work. I then tried uninstalling and deleting all associated files, restarting the computer, then re installing. That did not work either.

I noticeon Github that there are similar issues but they are marked as resolved.

I'm not quite sure where to ask this (so I try here), and I am at a loss of what to do next.

I appreciate any assistance,

Dylan

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,617 questions
Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
968 questions
{count} votes

7 answers

Sort by: Newest
  1. haruki akimoto 1 Reputation point
    2021-10-31T21:55:07.613+00:00

    I find out forgetten comment out of last description. */
    This cause problem in my program.


  2. Der Abt 1 Reputation point
    2021-07-12T11:30:16.073+00:00

    Same for me with VS 2019 10.3. It does not start at all.

    I tried EVERYTHING, including installing VS 2019 11.0 Preview -which also brings this error and does not start:
    "Visual Studio konnte aufgrund eines Fehlers nicht gestartet werden.
    StreamJsonRpc.ConnectionLostException:
    Die JSON-RPC-Verbindung mit der Gegenseite ging verloren, bevor die Anforderung abgeschlossen werden konnte."

    devenv /ResetSettings
    devenv /SafeMode
    devenv /Iforgotthisone
    ot starting as administrator
    did not fix it.

    • Repair Visual Studio
    • Install .Net 4.8 Development Components
    • Remove/Reinstall (later) All Addon Module
    • Uninstall Visual Studio and Reinstall it.
    • Install Version 11.0 Preview.
    • uninstalling everything and then run InstallCleanup.exe -f, redownload the online installer ands install just the .Net development as module: Brings the error during install.

    DID NOT HELP.
    So I never can get VS to run on my machine anymore unless I reinstall Windows, which I do not want to because of tons of software to reinstall/configure...

    Very annoying!


  3. Markus Pope 16 Reputation points
    2021-05-05T23:40:38.513+00:00
    • Delete all of the logs in %userappdata%\temp\servicehub\logs. (This will be c:\users{your user}\appdata\local\temp\servicehub\logs most likely.)
    • Start Visual Studio and get the error message saying that JSON-RPC blah blah blah.
    • Open the log files generated in the servicehub\logs folder.
    • If you see an error indicating that System.Numerics.Vectors 4.1.3.0 could not be loaded because the version installed doesn't match the manifest, then go to the next step.
    • Modify the devenv.config file in the C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE folder (replace with appropriate folder for community or enterprise) and add the following assembly redirect:

    <dependentAssembly>
    <assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
    <bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0"/>
    </dependentAssembly>

    • Modify the Microsoft.Developer.IdentityService.dll.config file in C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\ServiceHub\Services\Microsoft.Developer.IdentityService (again replacing professional with community or enterprise) and add the same assembly redirect.

    <dependentAssembly>
    <assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
    <bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0"/>
    </dependentAssembly>

    After I did this, I was able to start Visual Studio Professional. >:( There appears to be some weird conversation going on about the versioning on this specific file dating back a couple of years and apparently no one is willing to address the problem.

    2 people found this answer helpful.

  4. Markus Pope 16 Reputation points
    2021-05-05T22:53:45.223+00:00

    Has anyone found a solution to this? Looking in the servicehub\logs folder, I'm getting log messages about this stupid file:

    05/05/2021 17:35:03 Central Standard Time : Error : Exception: System.IO.FileLoadException: Could not load file or assembly 'System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) at int SpanHelpers.IndexOf(ref byte searchSpace, byte value, int length) at int MemoryExtensions.IndexOf<T>(ReadOnlySpan<T> span, T value) at SequencePosition? System.Buffers.BuffersExtensions.PositionOf<T>(in ReadOnlySequence<T> source, T value) at async ValueTask<(ValueTuple<int?, Encoding> ContentLength)> StreamJsonRpc.HeaderDelimitedMessageHandler.ReadHeadersAsync(CancellationToken cancellationToken) at async ValueTask<JsonRpcMessage> StreamJsonRpc.HeaderDelimitedMessageHandler.ReadCoreAsync(CancellationToken cancellationToken) at async ValueTask<JsonRpcMessage> StreamJsonRpc.MessageHandlerBase.ReadAsync(CancellationToken cancellationToken) at async Task StreamJsonRpc.JsonRpc.ReadAndHandleRequestsAsync()

    At the same time, I'm seeing this in the activitylog.xml file: <entry> <record>63</record> <time>2021/05/05 22:41:19.876</time> <type>Error</type> <source>GetIdeUserContextAsync</source> <description>StreamJsonRpc.ConnectionLostException: The JSON-RPC connection with the remote party was lost before the request could complete.&#x000D;&#x000A; at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A; at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A; at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)&#x000D;&#x000A; at StreamJsonRpc.JsonRpc.&lt;InvokeCoreAsync&gt;d__148.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A; at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A; at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A; at StreamJsonRpc.JsonRpc.&lt;InvokeCoreAsync&gt;d__1391.MoveNext()&amp;#x000D;&amp;#x000A;--- End of stack trace from previous location where exception was thrown ---&amp;#x000D;&amp;#x000A; at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&amp;#x000D;&amp;#x000A; at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&amp;#x000D;&amp;#x000A; at Microsoft.Developer.IdentityService.PipeManager.&amp;lt;InvokeRpcFuncAsync&amp;gt;d__131.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A; at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A; at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A; at Microsoft.Developer.IdentityService.StorageService.StorageServiceClient.&lt;GetAllAccountsAsyncInternalAsync&gt;d__20.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A; at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A; at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A; at Microsoft.Developer.IdentityService.StorageService.StorageServiceClient.&lt;GetAllAccountsAsync&gt;d__19.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A; at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A; at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A; at Microsoft.VisualStudio.Shell.Connected.ConnectedUser.IdeUserContext.&lt;HasPersonalizationAccount&gt;d__12.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A; at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A; at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A; at Microsoft.VisualStudio.Shell.Connected.ConnectedUser.IdeUserContext.&lt;AdjustSignInStatusAsync&gt;d__11.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A; at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A; at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A; at Microsoft.VisualStudio.Shell.Connected.ConnectedUser.ConnectedUserPackage.&lt;GetIdeUserContextAsync&gt;d__7.MoveNext()</description> </entry>

    0 comments No comments

  5. 2021-04-26T14:47:11.673+00:00

    I am having the same issue. Last week I upgraded to 16.9.4.
    In the mean time I uninstalled it via the installer and installcleanup tool. What remained at C:\Program Files (x86)\Microsoft visual studio and on c:\users\xxx\AppData\Local\Microsoft\VisualStudio I removed manually.
    I reinstalled 16.9.0 from https://learn.microsoft.com/en-us/visualstudio/releases/2019/history at the bottom of the page and still have same issue.
    I check with fuslogvw that there were not resolvable dll's and tried to copy some to the expected locations. But with no prevail.
    In the eventviewer I have the same as AlexandrBazarnyi-2400

    My windows 10 version: KERNELBASE.dll, version: 10.0.18362.1316
    I have .net framework 4.8 installed with release number 528040

    1 person found this answer helpful.
    0 comments No comments