Visual Studio 2010 Periodically Hangs for Several Seconds - visual-studio-2010

I'm having a problem where VS2010 Ultimate is freezing up every so often for several seconds before returning to normal operation. This happens several times during a session, and is obviously very annoying. I haven't been able to pin it down to any specific activity-- it seems to hang whenever I scroll around in a document, open/create a document, basically anything. Anyone else have this issue or know what might be the cause?

Incompatible add-ons or system configurations can cause Visual Studio issues (performance issue, error, etc).
Fortunately we can try to troubleshoot the issues by referring to the Visual Studio activity log.
Simply run the following command to run Visual Studio 2010 and log its all activities.
DevEnv.exe /log
The log file will be generated to:
XP
%USERPROFILE%\Application Data\Microsoft\Visual Studio\10.0\ActivityLog.xml
Vista & Windows 7
%USERPROFILE%\AppData\Roaming\Microsoft\VisualStudio\10.0\ActivityLog.xml
Once you run it, 2 files will be generated: ActivityLog.xml and ActivityLog.xsl
And when you open the ActivityLog.xml, it will contain something like this:

The problem was solved by deleting the user options file called SolutionName.suo.
Somehow it had gotten very big and probably corrupted. You will only lose your breakpoints and open files as far as I know, but rename it to be safe.

I know people have had problems with computers that are older or don't have as much RAM. I know my use of VS 2010 ultimate can run to 500 MB's sometimes and if you don't have enough RAM, then it will hang for a little.

I've had issues with VS2010 when debugging is running or if I'm opening files from a network drive. I'm not sure as I currently don't have any team server repos connected, but if you do maybe the connection to the repo might be an issue as well.

Turns out the issue was network related. One item in my solution was looking to a mapped network drive, which apparently didn't always respond fast enough.

My solution for that problem was beyond the scope of my thinking. I found it on this website, and it goes like:
Launch Internet Explorer. Go to Internet Options, then Advanced tab. Under the Security group, untick “Check for server certificate revocation“. You may need to restart Visual Studio.
My scenario is that I have network drives with references mapped via VPN. That should have to do with that.

I faced similar issue with Visual Studio 2008. I have not thoroughly investigated the issue though.
Reading your post it seems the behavior at your PC is really annoying, but for me it's not that frequent.
One thing I noticed, the frequency at which this happens is dependent on the RAM size and time elapsed since last setup. I came to this conclusion seeing the performance of machines of my colleagues.

I noticed that my anti-virus software tends to lock down my entire system sometimes. If you have an anti-virus application, you might try disabling it for a moment to see if it is the culprit.

I had a similar issue - that still happened after a /resetsettings, reinstall and using /safemode. For me, the issue was that Assembly Binding logging was turned on ago and I forgot to turn it off, it got to the stage where the log files concerned were >200MB and each append was taking ages...
Managed to find the issue with procmon from sysinternals. Suggest that anyone who comes across a similar issue tries procmon if none of the above solutions help.

My VS2010 would hang as well in a similar fashion.
DevEnv.exe /log would indicate it failed to load strings around the time it would hang.
Reinstalling VS2010 SP1 and deinstalling Resharper to install Resharper 7.1.3 solved the problem.

Related

Visual Studio Devenv.exe high cpu Usage

I am using VS 2013 ultimate, working on a project with Team Foundation Server. The problem is, every ten seconds, it hangs for up to 5 seconds, I am not compiling or anything, just writing code. Devenv.exe process jumps to more than 25% CPU and 670k of RAM. I have looked at the output from the JavaScript Language Service, and it constantly checks and says Referenced file 'D:\tfs\xxx.aspx' not found. Text search of the filename xxx.aspx in entire solution turns up nothing and I have the latest version. I think this is the reason of the spikes, does anyone know how I can turn off this feature in VS 2013?
EDIT: I have looked at other solutions, Browser Link is closed, I have the latest update
EDIT: I have found the solution, but I dont think it will really help anyone else. One of the guys referenced a hard drive path on top of a javascript page, and since the project is tens of thousands lines, cpu spiked as Visual Studio was searching it. Deleting the references helped in my case.
To narrow down this issue:
Try to disconnect from TFS server. (In VS→ Team → Disconnect from
Team Foundation Server) Check whether this abnormal phenomena still exist.
Use devenv/resetuserdata command to clear user settings of VS,
details refer to this blog: VSTS Tip: devenv /resetuserdata
If you are using proxy in your machine, try to disable the proxy
settings.
If there is anti-virus in the machine, also try to disable it.

Visual Studio 2010 (devenv) Hung Process After Closing

I have problem with Visual Studio 2010 on Windows 7 64-bit. After some time of work VS starts consuming ~50% CPU and UI responding slows down. When I close VS then UI disappear but process stay.
When I forgot to kill those hung processes at the end of day, I will end up with numerous devenv.exe processes.
I have reinstall Visual Studio and reinstall Windows and ended up with the same problem... doesn't change anything. Please help. :/
Remove and/or uninstall all third-party Visual Studio add-ins and extensions. Disabling is not good enough.
Visual Studio 2010 relies heavily on graphics. Therefore:
Update your video driver.
Turn off "Enable rich client visual
experience"
Turn off "Use Hardware graphics acceleration if
available"
There are also temporary files that Visual Studio uses that may need to be cleared out.
Clear out your %temp% folder.
Clear out %AppData%\Local\Microsoft\WebsiteCache
Clear out %AppData%\Local\Microsoft\VisualStudio\10.0\ProjectAssemblies
Your project and solution user settings may be corrupt due to so many "crashes".
Delete .user and .suo files (you will lose the startup project, bookmarks, breakpoints, and other user settings specific to projects and solutions.)
Begin where you began before - it may seem overkill but this is the only way to be sure we are addressing everything short of hardware issues.
Reinstall Windows - make sure you are using a validly licensed copy, and patch the hell out of it before installing Visual Studio.
Note: I doubt it is a GPU driver issue, but it never hurts to use the most up to date driver and this is the place to do it right after a fresh OS install.
Install Visual Studio .Net 2010 but do not start it up. Let it get the frameworks installed fresh.
Use Windows Update to install the VS 2010 SP1 patch, and any/all patches for .Net frameworks.
Make an images for yourself right here so you have something to build from if you need to try this again. It will save you lots of time.
Fire up Visual Studio, and test your closing before installing anything else.
If it does not work here, there's likely some conflict between PC hardware and window OS, and you should try to find this symptom in other applications to get more info.
Here's what i would be looking for:
Does it happen EVERY TIME?
Does it happen after you debug your project ? does it happen for ALL projects?
Does it also happen when you don't load any projects? (simply start the IDE and wait).
Does it happen after a debug session of your application? maybe the application is not closed properly?
Do you have any other apps running at the same time that may cause this? try reproducing with a minimal set of apps/services running.
What are you doing exactly when it starts freezing ? anything in particular?
I would try to get 2-3 memory dumps at the time of hanging, post it here as well as to MSFT people. That would be a good start.

Compile on-the-fly in Visual Studio 2008 very slow

I'm experiencing some performance problems. When I edit a file, Visual Studio 2008 performs a background (on-the-fly) compilation and then, it updates the error list. During this time, the cursor in the file editor disappears, and the keys I press to move or type more character are buffered.
Once the background compilation is finished, the changes are reflected in the editor (1 - 2 seconds). Every time I edit a file, which happens often, this happens.
How can I fix this problem? If this is not possible, can I disable this automatic build?
I had an odd performance-related issue today. My Microsoft Visual Studio seemed to be taking far too long to perform even the simplest of operations. I Googled around and tried a few ideas that people had such as disabling add-ins or clearing Visual Studio’s recent projects list but those suggestions didn’t seem to solve the problem. I remembered that the Windows SysInternals website had a tool called Process Monitor that would sniff registry and file accesses by any running program.
It seemed to me that Visual Studio was up to something and Process Monitor should help me figure out what it was. I downloaded the most recent version, and after fiddling around a bit with its display filters, ran it and to my horror, I saw that Visual Studio was so slow because it was accessing the more than 10,000 folders in C:\Users\krintoul\AppData\Local\Microsoft\WebSiteCache on most IDE operations. I’m not sure why there were that many folders and moreover, wasn’t sure what Visual Studio was doing with them, but after I zipped those folders up and moved them somewhere else, Visual Studio’s performance improved tremendously.
The Windows SysInternals website has a number of other useful utilities for network management, security, system information and more. Check it out. I’m sure you’ll find something of value.

Visual Studio 2010 suddenly slow

Recently, the editor for VS2010 suddenly became slow when I installed some extensions then uninstalled them. The program itself is running fine and starts up in seconds. Jumping around the menus is lightning fast, but editing code, there is a 1 second lag between the keyboard and the editor.
This happens on a brand new console application project with nothing in it. I have also uninstalled all extensions, resharper etc. The only extensions remaining are VisualHg, Ankh and Nuget.
I have an i7 with 16 gigs of RAM so hardware is NOT the issue.
Is there some sort of cache or files that VS could have locked onto?
How can I figure out what is causing the issue?
Well thanks to #jv42's suggestion, I installed the perfwatson extension and that sorted out the issue. I've since put some of the extensions back and VS2010 is running better than ever before.
I still don't know what caused the issue.
I would find a rollback point before you installed the plug ins. You could have malware that installed with the plugin but was not part of the uninstall. It could just be that the uninstall did not remove something it installed that was causing the problem. It is most likely going to be far faster for you to find a rollback point and start there than to try and figure out what process is causing you the problem and where it is hooked into the registry.
Try resetting your settings from the command line back to the factory default. Warning You will lose all your settings!
devenv /resetsettings
You can back them up, as well as reset, using this article.
finally refer this to fix my problem.
solution is:
Debug->Options and Settings->Debugging -> Symbols
change from All modules,unless excluded to Only specified modules
details:
here

Starting Visual Studio causes all running apps to hang and stop responding

After my laptop fell on the floor and its screen was a little damaged, I was able to continue working with it, but failed to build a project of mine. At some point, the system froze, and I was forced to restart the laptop. Ever since, I’m not able to start Visual Studio 2008 or 2010. Moreover, when I do try to start one of the versions, I see no splash screen, and at some point, all running applications stop responding, and I’m forced to restart the laptop.
When I started Visual Studio 2008 with the /SafeMode flag it started OK and worked perfectly, but when I tried it with Visual Studio 2010, I did see a splash screen and the application main window was opened, but then the system got stuck again and forced me to restart.
I use Windows XP SP3, and the addins I recall I have are Visual Assist, IncrediBuild, and Productivity Power Tools for VS 2010 (how can I check what other addins are installed without having Visual Studio running?)
I tried using the /Log flag to find out what’s happening, but there was nothing that seemed related in the generated log.
At the time of the hang, the CPU and memory of the system was low.
The problem happens whether I open Visual Studio with no solution, or with an existing solution.
Do you have any idea why this might happen, or how it can be solved?
Edit:
I run chkdsk /R /V and it is stuck on "1 percent
completed." for hours now. Is there anything I can do?
I'll try to re-install Visual Studio 2010 next week, when I'm in the office. I hope that will help.
Thanks a lot,
splintor
Your drive is torched. Buy a new drive, and salvage whatever you can from the existing drive, then swap them out. If you're lucky you can salvage enough of the existing drive to not need to do a full OS reinstall, but it's likely you're going to need to do some reinstallation.
Looks like the cause if the fall of your laptop. Though what changes happened is unknown it is more likely to be a hardware issue.
Did you reinstall the softwares and check how they work.
If I was diagnosing this issue, I would start from the ground up.
Start of with a basic CheckDisc - CheckDisk Instructions for XP
Progress from that to try re-installing over your existing VS install.
I can't see it being a software problem, so I reckon the checkdisk will discover/fix something, or a reinstall should resolve it.
Dave
You've probably damaged your hard disk in an area which is touched by VS. Windows often grinds completely to a halt when it's struggling to read a damaged area of disk.
Check the Windows event log for errors to do with disk drives.

Resources