Visual Studio 2015 crashes

74

Visual studio that won't be repaired...
Everytime I want to compile an app on vs 2015 - it crashes. Even if I want to compile the main function or write somthing to it, there appears a window, which says

Visual Studio 2015 has stopped working

It goes same on 2013 Express version. I have a clue why it won't work: when I open Team Explorer, an error appears:

Page '3185ed96-1cbd-4381-a439-636973542e50' not found.

I tried everything I have found in the internet and trust me - nothing worked. I also tried some command prompt commands:

devenv.exe/ debug  
devenv.exe/ resetsettings  
devenv.exe/ instalvstemplates  
devenv.exe/ resetskippings  
devenv.exe/ resetuserdata  
devenv.exe/ setup  
devenv.exe/ safemode  

Debug mode gave me some info about the error:

An unhandled exception of type 'System.InvalidOperationException' occurred in mscorlib.dll

Additional information: The service 'Microsoft.Internal.VisualStudio.Shell.Interop.SVsUIThreadInvokerPrivate' must be installed for this feature to work. Ensure that this service is available. HRESULT = 0x80004002

An exception was encountered while constructing the content of this frame. This information is also logged in "C:\Users\admin\AppData\Roaming\Microsoft\VisualStudio\14.0\ActivityLog.xml".

Exception details:
System.ArgumentException: Parametr is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at Microsoft.VisualStudio.Shell.Package.CreateToolWindow(Type toolWindowType, Int32 id, UInt32 flags)
   at Microsoft.VisualStudio.Shell.Package.CreateToolWindow(Type toolWindowType, Int32 id, ProvideToolWindowAttribute tool)
   at Microsoft.VisualStudio.Shell.Package.FindToolWindow(Type toolWindowType, Int32 id, Boolean create, ProvideToolWindowAttribute tool)
   at Microsoft.VisualStudio.Shell.Package.CreateToolWindow(Guid& toolWindowType, Int32 id)
   at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsToolWindowFactory.CreateToolWindow(Guid& toolWindowType, UInt32 id)
   at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.ConstructContent()

But still nothing I was able to find has worked.

I reinstalled VS and repaired it - still nothing. Then I have downloaded some .dlls, microsoft visual c++ redistributable packages and used Ccleaner to clean registry. I think it's a very strange error; if you could advise me on a fix please?

visual-studio
visual-studio-2015
asked on Stack Overflow Jun 24, 2015 by Phastasm • edited Jun 24, 2015 by Phastasm

10 Answers

84

Uncheck [Tools->Options->Environment->Automatically adjust visual experience based on client performance]

Uncheck [Use hardware graphics acceleration if available]

You can leave [Enable rich client visual experience] checked

I was having a lot of problems anywhere from random crashes, to crashing my Intel Graphics display driver, I turned it off and I have had no problems, it actually runs better. Maybe it will work for you

answered on Stack Overflow Oct 17, 2015 by user3141117 • edited Feb 2, 2017 by hanuma
19

I was facing the same issue for team explorer. First of all close all instances of visual studio and then try:

devenv /resetuserdata

Run above command at the command prompt; typically something similar to "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE"

answered on Stack Overflow Jul 4, 2016 by Ashu_90 • edited Jun 28, 2019 by Amit Joshi
5

Possible fix for these type errors:

try to update device driver (Intel HD Graphics) or Run with graphic driver if u got switch based or vice versa.

main executable is located

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe

Also if you are getting these type error on installation exe you can fix it the same way enter image description here

answered on Stack Overflow Jul 27, 2015 by qwr • edited Jul 27, 2015 by qwr
2

Visual Studio uses WPF: From this link: "Windows Presentation Foundation (WPF) differs from prior application platforms on Windows in that it uses its own DirectX-based hardware-accelerated rendering pipeline, when available, to draw the contents of any WPF windows. Prior application platforms were typically much less dependent on display driver quality because the bulk of their rendering was done in software rather than hardware." So, it may conflict with the display driver causing it to stop if you don't have latest display driver or the latest .NET framework. Though there might be other reasons.

There is also a registry settings(regedit) which might help: You can add a new DWORD(for 32-bit systems) or QWORD(for 64-bit) by going to [HKEY_LOCAL_MACHINE->SYSTEM->CurrentControlSet->Control->GraphicsDrivers] and setting the name to "TdrDelay" and value to "8". Make sure the value's base is set to hexadecimal. TDR- Timeout Detection and Recovery.

If any of the above doesn't work. Try disabling any hardware accelerated rendering features in Visual Studio from [Tools->Options]. From your ActivityLog file, it seems that the exceptions are mostly in the graphics methods. So, my guess is it has to do with graphics rendering.

answered on Stack Overflow Jan 15, 2016 by Lokesh Meher • edited Jun 20, 2020 by Community
2

Click on Tools menu > Import and Export Settings > Reset all settings > Next > "No, just reset settings, overwriting all current settings" > Next > Finish.

answered on Stack Overflow Aug 27, 2018 by Chinnadurai
0


i have faced problem of visual studio installation it stop before start installation and i just go to control panel > programs >Turn windows features on or of > just uncheck all the .NETframework versions and restart your machine and then start the installation this just how it works with me

answered on Stack Overflow Sep 5, 2016 by wdhassan • edited Sep 5, 2016 by Uttam Kumar Roy
0

You can also try closing VS, deleting the bin directory then attempting to debug again – it has worked for me.

0

It's been a while, but I'm seeing similar behavior since today. Every time I load our solution, VS2015 crashes and restarts. Windows Event Log shows 'out of memory exception' but there's over 2GB free at the time of the crash. the faulting module is KERNELBASE.DLL

In case this helps anyone:

Faulting application name: devenv.exe, version: 14.0.25420.1, time stamp: 0x57685d85
Faulting module name: KERNELBASE.dll, version: 6.1.7601.23915, time stamp: 0x59b94abb

I'm suspecting a windows update, as none of my colleagues have this problem and unfortunately I'm that nerd who always installs his updates ASAP.

answered on Stack Overflow Nov 30, 2017 by increddibelly
0

I found this SOF article and tried everything listed.

And I found a new caveat to this voodoo.

Mine falls under the "the dumbest reason ever" category.

My temp folder was "full". So I did a disk clean up, and that deleted the FILES. However, I had a large amount of subfolders in my temp folder and while they were empty, the folders themselves were causing GetTempFile functions to fail.

So when I ran

"C:\blah\blah\blah\IDE\devenv.exe" /log

the log entries in ActivityLog.xml were showing something like this:

System.IO.IOException: The file exists.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.__Error.WinIOError()
   at System.IO.Path.InternalGetTempFileName(Boolean checkHost)
   at System.Windows.Input.Cursor.LoadFromStream(Stream cursorStream)
   at Microsoft.VisualStudio.Text.Editor.Implementation.LeftSelectionMargin.get_RightArrowCursor()
   at Microsoft.VisualStudio.Text.Editor.Implementation.LeftSelectionMarginProvider.CreateMargin(IWpfTextViewHost textViewHost, IWpfTextViewMargin containerMargin)
   at Microsoft.VisualStudio.Text.Utilities.ContainerMargin.<AddMargins>b__2(IWpfTextViewMarginProvider mp)
   at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InstantiateExtension[TExtension,TMetadata,TExtensionInstance](Object errorSource, Lazy`2 provider, Func`2 getter)

In that log entry text, don't miss the text "System.IO.Path.InternalGetTempFileName"

So several places said "delete your temp files", which I did, but I still got the same issues. :(

Then I took a look at the temp directory, and I saw something weird. A large amount of (empty) subfolders.

So once I discovered I had a bunch of subfolders in my temp directory, I cleaned up these subfolders.

I found this question:

How to delete files/subfolders in a specific directory at command prompt in Windows

So I used this code:

I put this code in a .bat file

del /q "C:\Users\MYUSERNAME\AppData\Local\Temp\*"
FOR /D %%p IN ("C:\Users\MYUSERNAME\AppData\Local\Temp\*.*") DO rmdir "%%p" /s /q

And now my Visual Studio is running ok again.

Wow, go figure.

answered on Stack Overflow Feb 6, 2018 by granadaCoder • edited Feb 6, 2018 by granadaCoder
0

if you're using windows 10. Try installing VS2015 update 3

https://docs.microsoft.com/en-us/previous-versions/mt752379(v=vs.140)?redirectedfrom=MSDN

answered on Stack Overflow Oct 21, 2019 by Ravi Rajindu

User contributions licensed under CC BY-SA 3.0