question

DougMatthews-8586 avatar image
1 Vote"
DougMatthews-8586 asked JieYan-6466 answered

Visual Studio 2019 constantly crashing

Hi. I'm at my wit's end with this. I've used VS2017 for years, it was mostly solid. Just a few little quirks. I recently installed 2019 Community so I could use .NET 5 and it's nothing but headache after headache. It's laggy, has a lot more quirks (like toolbox taking 30+ seconds to load, component properties blank, last opened class totally blank when opening a project, etc) but the most aggravating is constant crashing. I've lost so much work to it. It crashes and in the event log I have two errors:

 Application: devenv.exe
 Framework Version: v4.0.30319
 Description: The process was terminated due to an unhandled exception.
 Exception Info: Microsoft.DotNet.DesignTools.Client.DesignToolsClientException
    at Microsoft.DotNet.DesignTools.Client.DesignToolsClient+<SendRequestAsync>d__49`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
    at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()
    at Microsoft.VisualStudio.Threading.JoinableTask`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].CompleteOnCurrentThread()
    at Microsoft.VisualStudio.Threading.JoinableTaskFactory.Run[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Func`1<System.Threading.Tasks.Task`1<System.__Canon>>, Microsoft.VisualStudio.Threading.JoinableTaskCreationOptions)
    at Microsoft.VisualStudio.Threading.JoinableTaskFactory.Run[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Func`1<System.Threading.Tasks.Task`1<System.__Canon>>)
    at Microsoft.DotNet.DesignTools.Client.DesignToolsClient.Microsoft.DotNet.DesignTools.Protocol.Endpoints.IRequestSender.SendRequest[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.String, System.__Canon)
    at Microsoft.WinForms.DesignTools.Protocol.Endpoints.ToolStripInSitu.GetIgnoreMessagesEndpoint+Sender.SendRequest(System.Object)
    at Microsoft.WinForms.DesignTools.Protocol.Endpoints.WinFormsEndpoints+ToolStripInSituImpl.GetIgnoreMessages(System.Object)
    at Microsoft.WinForms.DesignTools.Designers.ToolStrips.ClientToolStripInSituService.get_IgnoreMessages()
    at Microsoft.DotNet.DesignTools.Client.Designers.PbrsForward.System.Windows.Forms.IWindowTarget.OnMessage(System.Windows.Forms.Message ByRef)
    at System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)
    at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr, Int32, IntPtr, IntPtr)

and

 Faulting application name: devenv.exe, version: 16.10.31321.278, time stamp: 0x60a85eca
 Faulting module name: KERNELBASE.dll, version: 10.0.19041.1023, time stamp: 0xcbf6f7d1
 Exception code: 0xe0434352
 Fault offset: 0x0012a6f2
 Faulting process id: 0x2a48
 Faulting application start time: 0x01d7566331a916e1
 Faulting application path: C:\Apps\VS2019\Common7\IDE\devenv.exe
 Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
 Report Id: 5c4b4194-b42a-4328-9024-993ea5287035
 Faulting package full name: 
 Faulting package-relative application ID: 


I can't go more than 10 minutes before it blows up. I'm about to uninstall this garbage and go back to 2017 and just try to find an alternative to that for which I needed .NET5. Funny thing is I wasn't even aware community existed, I was ready to drop $500 on a 2019 Pro license before someone clued me in. I'd be livid if I had paid $500 for this hot mess.

So I'm doing a repair right now, but does anyone have insight into anything I can do to fix this?

vs-general
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I noticed you installed Visual Studio in a location other than the default location, have you considered uninstalling Visual Studio and installing in the default location?

Also dependent on you ant-virus software consider placing devenv in a white list (meaning anti-virus software will not scan devenv for viruses).

0 Votes 0 ·
SimpleSamples avatar image
0 Votes"
SimpleSamples answered

Try -SafeMode. If the crashes do not happen in safe mode then you know it is an extension causing the problem.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AnnaXiu-MSFT avatar image
0 Votes"
AnnaXiu-MSFT answered

Hi DougMatthews-8586,

Welcome to Microsoft Q&A!

Have you created a new project to check if there is the same issue?


The code 0xe0434352 usually means the exception of .NET Framework.
Please check the project target framework by right-clicking on the project > Properties. And try to change the target framework and check if the issue happens or not.

In addition to try the solution from SimpleSamples, you can repair your .NET Framework by using the tool:
https://docs.microsoft.com/en-us/dotnet/framework/install/repair

Sincerely,
Anna


If the answer is helpful, please click "Accept Answer" and upvote it.
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.





5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MikeR-3236 avatar image
1 Vote"
MikeR-3236 answered MikeR-3236 published

I'm having the same issue. I get the identical stack trace and details in the event viewer. Same .dll and same exception code, same version numbers and same public key tokens.

I've tried the steps suggested above by Anna, but no luck.

My installation is in the default location on C:\

Mine will crash when clicking on a [Design] tab in the editor of a form. I've gotten to the point where I always manually save before clicking on those tabs because it crashes more times than not.

I have no extensions or nuget packages installed. The only configuration changes I've made from stock have been in the preferences of Visual Studio itself. Nothing external.

I'm using .NET 5 in the project's properties. The only other options are .NET Core 3.1 and 3.0. I've tried selecting those, but still end up with crashes.

It's solid as a rock as long as I don't go into the form designer. I can use the forms designer, it doesn't crash every time. But if it's going to crash, that's what does it.

Thanks,

Mike



Edit: Another bit that might be helpful - I've noticed that when I reopen the solution after a crash, sometimes the designer won't display properties for selected controls. I can click on them, and they'll appear to be active, with the appropriate resizing handles and such, but the properties panel on the right will be blank. Not blank properties, but no properties at all. I have to close the designer tab and reopen it to fix it. Could something in the rendering of the display be getting corrupted, crashing the editor, then fixed only by closing and reopening the tab?

· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

You say you have no extensions or Nuget packages installed but have you tried SafeMode anyway?

0 Votes 0 ·

I gave that a shot and have some results:

I get an error message that says: The 'Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.ProjectPackage' package did not load correctly.
The solution then fails to load, and gives this error code: 0x80004005. And over in the solution explorer, next to the project, it said "needs migration".


This page:
https://developercommunity.visualstudio.com/t/microsoftvisualstudioprojectsystemvsimplementation-1/1205513

says to try deleting the ComponentModelCache folder, which I did, and got the same result.

This page:
https://stackoverflow.com/questions/17574089/how-can-i-fix-the-microsoft-visual-studio-error-package-did-not-load-correctly

Says to try these commands:
devenv.exe /clearcache
devenv /updateconfiguration

Which didn't help.

It also suggested:
Try devenv /setup on the Visual Studio Command Prompt with administrative rights.

Didn't work.

It also suggested:

gacutil -if Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.Shell.Interop.8.0.dll

(with modification to .12 for VS 2019)

That actually made something different happen.
I no longer got the messagebox above about the package. However, the solution still failed to load, with the same error code. But, it still said "needs migration".

This was created in VS 2019, and I have no other versions installed, so this is a bit confusing.

0 Votes 0 ·

I restarted VS normally, and the solution opened normally. I cleaned and built, and it ran. Returning to Safemode, I once again get the error message about the package above.

The package error message references an ActivityLog.xml, which is 1200 lines, and contains references to 80 errors. A few of them:

<source>ToolboxControlsInstaller
Exception parsing Windows Presentation Foundation (under HKEY_LOCAL_MACHINE\Software\Microsoft.NETFramework) as a version

Most are like that one, with different info under the exception parsing description.

<source>VS/LicensingNotifications/InitializeNotifications
Microsoft.VisualStudio.Shell.ServiceUnavailableException: The SVsToastService service is unavailable

<source>VisualStudio
LegacySitePackage failed for package [Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.ProjectPackage]Source: Microsoft.VisualStudio.Shell.15.0; Description: The SVsOperationProgress service is unavailable.

<source>VisualStudio
LegacySitePackage failed for package [Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.ProjectPackage]Source: Microsoft.VisualStudio.Shell.15.0; Description: The SVsOperationProgress service is unavailable.

<source>VisualStudio
SetSite failed for package [Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.ProjectPackage]



That's as far as my GoogleFu has been able to take me. I can't find anything useful under those error types. Hopefully something in this process is helpful to someone to figure this out.

0 Votes 0 ·
Show more comments
RoewerPaul-5351 avatar image
0 Votes"
RoewerPaul-5351 answered

I had the same problem. I just tried something that worked for me. My solution files were on OneDrive. When the problem occurred, I tried all of the suggestions mentioned in this thread. Nothing worked. Finally, I copied my solution folder to my local drive (C:\tmp) and the problem went away. I was able to open a Form in the designer. Then interestingly, I copied the solution folder from my local drive back to the OneDrive, opened it in Visual Studio, and the problem went away. I was able to open the Form in designer. I don't know why it worked, but it did.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

03349841 avatar image
0 Votes"
03349841 answered

update a new one,haha

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

lkeAmasya-5561 avatar image
0 Votes"
lkeAmasya-5561 answered lkeAmasya-5561 published

Does anybody have a fix on this issue?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

RobertZimmerman-2509 avatar image
0 Votes"
RobertZimmerman-2509 answered

A few days ago, VS 2019 started crashing on me. It was unstable before when I would open it and no SSRS reports would appear until a few minutes later. So, I uninstalled. Then, I tried to uninstall the installer thinking that might be the problem. The installer was corrupt. So, I attempted to install VS 2022. Perhaps the installer repaired itself because the installation of VS 2022 was successful. However, the same problem still exists when I open VS 2022, create a new SSRS project, and attempt to create a shared datasource, the app freezes then crashes. So, I'm not thinking I can install VS 2017 and that will be the solution. VS 2019 and VS 2022 will simply not work on this laptop. Short of reinstalling Windows, I cannot use VS for any of my development work. I have researched this issue, installed the Debug diag tool to whatever end I cannot determine since I'm not an OS level expert nor do I want to be. This very situation can cause me to make changes to my job path. If I cannot build on my SSRS skills, I will have to turn to another tool to learn. To say I'm angry was several days ago. Now, I'm just beside myself thinking how can a software company allow this to happen? I'm one of thousands of others who have the same problem. Isn't there a fix that addresses what apparently a stack overflow error due to some recursive calling of specific DLLs or something to that effect? Doesn't errors like "faulting application path" and "faulting module path" sound more intuitive if you said "sorry, SOL, may I suggest you try learning Power BI?"

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JieYan-6466 avatar image
0 Votes"
JieYan-6466 answered

Noticed recently that my VS 2019 and 2022 both have lots of crashes, delayed my work quite a bit.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.