VS2022 crashes with version 17.5.2 (as it did with 17.5.1)

HeSitated 15 Reputation points
2023-03-16T08:25:23.4066667+00:00

After updating VS2022 to v17.5.2 I get this popup:

2023-03-16_08h56_33

Restarting VS makes it even worse: after the solution is fully loaded, VS crashes completely.

In the ActivityLog.xml is this error:

  <entry>
    <record>384</record>
    <time>2023/03/16 07:56:23.099</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>SetSite failed for package [VSPackage]Source: &apos;mscorlib&apos; Description: The JSON-RPC connection with the remote party was lost before the request could complete.&#x000D;&#x000A;StreamJsonRpc.ConnectionLostException: The JSON-RPC connection with the remote party was lost before the request could complete.&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at StreamJsonRpc.JsonRpc.&lt;InvokeCoreAsync&gt;d__156.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at StreamJsonRpc.JsonRpc.&lt;InvokeCoreAsync&gt;d__145`1.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.Developer.IdentityService.PipeManager.&lt;InvokeRpcFuncAsync&gt;d__14.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.Developer.IdentityService.StorageService.StorageServiceClient.&lt;SetAdditionalContextPropertiesAsync&gt;d__17.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.Developer.IdentityService.StorageService.StorageServiceClient.&lt;InitializeAsync&gt;d__14.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.Developer.IdentityService.StorageService.StorageServiceClient.&lt;CreateAsync&gt;d__13.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.Developer.IdentityService.AccountManager.&lt;GetStoreAsync&gt;d__31.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.AppInsights.GettingStarted.AppInsightsAccountService.&lt;InitializeAsync&gt;d__10.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.AppInsights.GettingStarted.AppInsightsAccountService.&lt;CreateAsync&gt;d__9.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.AppInsights.GettingStarted.VSPackage.&lt;&gt;c__DisplayClass25_0.&lt;&lt;InitializeAsync&gt;b__0&gt;d.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Shell.AsyncPackage.&lt;&gt;c__DisplayClass29_0.&lt;&lt;AddService&gt;b__1&gt;d.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Threading.AwaitExtensions.ExecuteContinuationSynchronouslyAwaiter`1.GetResult()&#x000D;&#x000A;   at Microsoft.VisualStudio.Threading.AsyncLazy`1.&lt;&gt;c__DisplayClass13_0.&lt;&lt;GetValueAsync&gt;b__0&gt;d.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.AppInsights.GettingStarted.CodeLens.AISolutionDataManager.&lt;InitializeAsync&gt;d__51.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.AppInsights.GettingStarted.VSPackage.&lt;&lt;InitializeAsync&gt;b__25_5&gt;d.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Shell.AsyncPackage.&lt;&gt;c__DisplayClass29_0.&lt;&lt;AddService&gt;b__1&gt;d.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Threading.AwaitExtensions.ExecuteContinuationSynchronouslyAwaiter`1.GetResult()&#x000D;&#x000A;   at Microsoft.VisualStudio.Threading.AsyncLazy`1.&lt;&gt;c__DisplayClass13_0.&lt;&lt;GetValueAsync&gt;b__0&gt;d.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.AppInsights.GettingStarted.AppInsightsMenuCommandService.&lt;InitializeAsync&gt;d__21.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.AppInsights.GettingStarted.VSPackage.&lt;InitializeAsync&gt;d__25.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Shell.AsyncPackage.&lt;&gt;c__DisplayClass21_0.&lt;&lt;Microsoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize&gt;b__1&gt;d.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e)&#x000D;&#x000A;   at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck)</description>
    <guid>{1A4EFADE-F6B2-4490-A2EF-21D5F3D1C8E0}</guid>
    <hr>0x80131500</hr>
    <errorinfo></errorinfo>
  </entry>

With VS v17.5.1 I had the same problem.

Edit

Two colleagues do not have this problem (one with and one without R#)

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,604 questions
{count} votes

3 answers

Sort by: Most helpful
  1. HeSitated 15 Reputation points
    2023-03-21T15:40:29.9533333+00:00

    After step 1-3 VS completely refused to start with the message:
    2023-03-21_16h33_59

    So I'm back to 17.4.5.

    1 person found this answer helpful.

  2. Tianyu Sun-MSFT 27,271 Reputation points Microsoft Vendor
    2023-03-16T13:18:23.1233333+00:00

    Hello @HeSitated ,

    Welcome to Microsoft Q&A forum.

    Please first open Developer Command Prompt for Visual Studio 2022, type and run this command devenv /SafeMode. After running this command, VS 2022 will be opened automatically, please check if the same error appears.

    If the same error doesn’t appear, the error should be caused by installed extension(s). Please open Visual Studio and go to Extensions > Manage Extensions > Installed, disable the third-party extensions one by one to narrow down this issue. If you finally find the corresponding extension, please try to uninstall it.

    If the same error appears again, please try following:

    1. Repair VS from VS Installer > More > Repair.
    2. Reset VS settings by running devenv /ResetSettings command in Developer Command Prompt for Visual Studio 2022.
    3. Remove Visual Studio cache by renaming/removing every folders called ComponentModelCache in C:\Users\username\AppData\Local\Microsoft\VisualStudio\17.0_XXXXXXXX folder.
    4. If the issue only appears on specific project, please try to clean project cache by removing the hidden .vs, bin and obj folders.
    5. Try to reinstall the corresponding workload(s) in VS Installer if this issue occurs for specific development.

    Besides, please press Win+R > type and run regedit > select Computer > click Edit > Find… > input the guid number that shows in the ActivityLog.xml > click Find Next button to check if this guid points to any specific program.

    Please feel free to let us know if it works.

    Sincerely,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more