Visual Studio 2022 randomly started freezing my system - visual-studio

I've been working with Visual Studio 2022 for a couple of months now, and I've used previous versions for years without any problems.
Today I copied a piece of code to rearrange it, saved right after and the program froze so bad I had to restart my whole system.
Ever since this happened I cant use the software, any time I try to do so it completely freezes my system after a couple of minutes, no matter which of my solutions I open or if I create a new one. I've also noticed it being much slower than it used to be.
I also don't use any extensions besides a color pack.
I use VS Code on the side as well, I don't experience any problems with it, I also doubt that my system is out of memory as I usually have 20+gbs of ram available.
Should I just reinstall Visual Studio completely? I really cant wrap my head around some corrupted files causing so much trouble.

Related

While developing in the Visual Studio 2013 IDE, CPU spikes and it becomes very laggy

The problem
When using Visual Studio 2013, Ultimate update 5, the IDE becomes very laggy (not running anything), and CPU spikes eating consistently around 30% up to 100% CPU.
Particulars (what I am doing when this happens)
This happens quite often and doesn't seem to be dependant upon any specific project. I have tried re-installing (fresh), as well as from scratch (format, reinstall windows, install ONLY visual studio + a very moderate suite of developer controls [2 well known companies (DevExpress, and Telerik)])
What is also very odd, is this happens even when developing a console application, although it takes much longer for this to occur.
The system I am running is more than adequate (according to their specs required), and Visual Studio is really the only application experiencing this lag + cpu spike issue.
(notice the cpu spike to 58%. this was also visual studio doing that in the background)
This is not a code issue, but an issue somehow with the IDE itself. What I am hoping for is a solution involving something that I may need to tweak / adjust / disable / etc which is contributing to this. As an aside, I really have no idea why there are so many handles open when Visual Studio is running. 91k seems quite excessive.
Another issue (pointing it out as it may be related), when publishing a project, after publishing, Visual Studio keeps automatically checking 'Click Once' when I have explicitly disabled it. This needs to be unchecked after every time I publish or else the next publish/compile/test run, results in an 'mscorelib' message complaining that the pdb doesn't exist, even though it does, and I have used it in other projects. What is frustrating about this problem is that I am telling it I don't want the project to be clickonce, and after it builds a non-click once project for publish, Visual Studio enables it effectively making this checkbox useless and wasting valuble time having to do this after each publish. Time, that adds up -- especially with the persistent lag.
I am confident I am not the only one who has experienced this due to reproducing this issue on a fresh and bare setup of both the operating system, and visual studio with nothing else aside from two popular component suites. As such, this is my attempt to reach anyone else who has experienced this, and if you did find a solution (or cause), to lend a hand to me.

Visual Studio 2015 Community Edition intellisense increasingly slower

I'm using VS2015 Community Edition for several ASP.Net MVC projects.
The editor was nice and fast and I could be very productive. But over a week or two the editor has started "pausing" more and more, not letting me type or do much of anything. Eventually it comes back and types some of what was in the buffer.
This has gotten worse and worse with time. To the point where it's almost unusable. I have disabled all of the extensions and tools that I have installed but that doesn't seem to make a difference.
Eventually I ran VS via Devenv.exe /resetskippkgs and everything started running faster again for a week or so then it gradually got worse.
Anyone have any ideas what it might be? I am not running Resharper but am running CodeMaid and Code Digger along with a few MS Powertools.
Your issue doesn't sound typical; what variables can we eliminate?
Extensions are a common culprit. Try the following:
Open the Developer Command Prompt (search for Developer)
Enter: devenv /safemode
Run in SafeMode for some time and see if the problem is eliminated.
VS ships with a number of built-in, required extensions as well as supporting third party extensions, and it's hard to identify which is which. SafeMode shuts off only the third-party extensions so your VS continues to operate normally.
If you do not experience the issue running in SafeMode, then try identifying the extension (or combination of extensions) at fault by elimination.
Another possible external cause of symptoms like this could be hardware failure; running a disk analyzer might be in order.
It's entirely possible you've encountered a VS bug, but I don't know of one in 2015 RTM with this profile. If you use Send-a-Frown (happy face in the upper right margin) when the UI is lagging, a Perf Watson report may be generated automatically. This would be a big help in trouble-shooting the problem.

Visual Studio 2010 Premium SP1 Very Annoying Typing Lag

I've recently noticed that after my projects grow a certain size I end up getting a lot of VERY annoying typing lag in VS2010. It affects every language and every word I type ends up taking around 5 seconds to render - the same with deletes, it also buffers them well enough as if I become unreasonably impatient and hit delete again 3 seconds later... it processes ALL my deletes.
So the obvious point is hardware: Intel Core2 6300 # 1.87GHz, 2GB RAM, 32-bit OS and a usual 7200rpm 8MB cache HDD, shouldn't experience this much lag surely! So I've decided to uninstall and re-install VS2010 to remove any plugins I may be using (the only one I personally installed was AnkhSVN for Subversion). Still the exact same problem.
Where I'm up to now, I've just attached a debugger to view the native code of my devenv.exe process and I see that every character I type throws a huge number of these First-chance exception at 0x757ed36f in devenv.exe: 0xE0434352: 0xe0434352. - anybody have any idea what this is / how I can find the source of these offsets?
I experienced the same issue when editing .cshtml files in Visual Studio 2010. At first I thought it was a memory issue, but MemTest showed no errors and it was a very isolated problem within Visual Studio, so I looked elsewhere.
I searched through some forums and got the idea to look at Extensions I had installed. For me, the only one that pertained to editing CSS/HTML that I was running was Web Essentials. I uninstalled it and restarted the IDE, and the lag was gone.
It is strange because I have been running this extension for awhile in multiple environments and never experienced any issues. I'm not sure what changed or why it broke, but for anyone having this problem, look at the extensions you have installed.
I have also heard a lot of people having issues with the CSS3/HTML5 Web Standards Update extension. I didn't have it installed but it might cause similar issues.
I experienced the same issue in VS2012. After reading mhornfeck's answer I tried uninstalling the following via Add/Remove Programs then restarting VS:
Microsoft Office Visual Web Developer 2007. Product Version: 12.0.4518.1066.
Microsoft ASP.NET Web Pages. Product Version: 1.0.20105.0.
And the lag is gone!

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.

Is there any risk while using Visual Studio 2010 Beta 2?

Is it safe to use the beta versions of Visual Studio?
By safe I mean, while developing any project in this studio, is it probable that it may cause some losses to my project? Or any other kind of risk?
Should I just use the studio 2008 and
wait for the stable version of Studio
2010?
Purpose of the question: I am doing my graduation project in .NET framework (includes - C#, WPF etc.).So I don't want to put my project at any risk because of some issue regarding (beta) visual studio.Hence the question.
As long as you are using a version control system, there should be no problem. Simply check out your project (or better yet, create a vs2010 branch) to an experimental folder and work from there.
There are no hidden risks when you use version control appropriately.
Visual Studio 2010 will convert your project files to its new format, meaning you'll have trouble if you want to go back to VS2008 later. I'd suggest holding off for now unless you can find a way to keep both old and new versions of the project files up to date.
There's always a risk in using beta software (but then again, there's always a risk in using any software). The whole reason it's called beta is because the company is not confident that it's got all the bugs worked out. Otherwise, it would have been released so they could start raking in the moola.
There are quite a few ways to mitigate the possibility of any beta software (not limited to VS2010 or even any programming-related product) from causing you trouble. Choose any from this list, which is by no means exhaustive:
Don't use it on the same data (be it accounting information or source code) until you've run it in parallel and gotten the same results as with the older version.
Plan a backout strategy if the software is so bad that it's easier to go back than to try and go forward.
Backup your data even more frequently during the periods where you're using the beta software, up until the point that you're comfortable with it and can revert to a more normal backup strategy.
Don't use beta software at all - wait for the real release (or SP1 if you want to be even safer). There may not be a driving force behind updating to the latest version.
As a company, limit your exposure to the beta software to a small set of your employees. So, for example, if you have six different teams, choose the least important as a sacrificial lamb, so to speak.
My own personal preference is to wait until everyone else has sorted out the problems first. I didn't upgrade to the latest Ubuntu while it was in beta (I still got burnt a little bit with the video and X but that particular problem already had a solution on the net). I don't download the latest and greatest Eclipse until it's been in use for a few months. I'm still using VS2008 under Windows XP since there's nothing I think I need in the latest release (of VS or Windows).
We obviously have the latest and greatest OS' in our test environments but they're crash-and-burn environments that won't cause any real pain if they blow up (other than a rebuild but even that's pretty painless nowadays).
For your particular circumstance, I would probably stick with a tried and true version. You don't seem to have a pressing need for any of the new features in your question and the sort of failure you're talking about is not just losing some information at work which, while annoying, is probably backed up to the point where your career would survive.
A similar loss of your educational work would affect you for a long time if you fail your subject because of it. I would probably just concentrate on getting it finished rather than worrying about what VS2010 beta might do to my work. Don't misunderstand me, you should still be protecting your work even with VS2008 but I'd personally feel safer with that option.
Then, if you have some spare time at the end of your project (hah! as if that would happen!), you could try to convert what you've done so far to VS2010. If it all goes pear-shaped, you still have all the VS2008 stuff available.
There is certainly risk in using unproven software in that it could behave unexpectedly. Some of the answers here focus on protecting your source code and that is a valid concern, but you should also consider other risks.
Could Visual Studio 2010 make your system unstable? Having your source code in a local instance of source control won't do you much good if Visual Studio corrupts your hard drive. Even if you backed up regularly, you'd still be out a good day or two (MINIMUM) rebuilding your desktop.
Also, what do you intend to do with the finished product? Will a professor attempt to open the project on their own desktop? Are you expected to deploy it to another environment? We see these "Works on my computer" problems using proven software, a beta certainly increases the probability of running into this type of problem.
So yes, there is certainly increased risk in using a beta. You can take steps to mitigate the risks but with important work those are steps you should be taking anyway. Is the benefit of using Visual Studio 2010 worth the increased probability of delays / data loss / grade impact?
I know I'm experimenting with VS2010 and I haven't seen severe problems but betas are not proven/guaranteed - the overall risk is probably slight but it is a risk nonetheless.
I guess I would approach the question differently...Is there any real value in using VS 2010 over 2008? I have been using both for a while and I would say, No.
I have had some mysterious crashes with VS 2010 and the application has disappeared on me, causing me to lose any unsaved data.
If you are integrating IronPython / Ruby or working with Office or VB style COM, there is more support for this in .NET 4.0. Beyond that, most of the changes add some shine to the IDE, but not much real value.
my 2 cents.
The biggest risks you will face are crashes, random tool window misplacements, and occasionally Visual Studio will refuse to start and you will have to reset all your settings to have it working again. 1 (I am anyway reasonably happy with Visual Studio 2010 and don't regret having installed it; in my case the compelling reasons were unit testing and visual designer for Silverlight)
But as ocdecio says, there should not be danger for your code, especially if you use a source control system.
As an additional advise, target your projects to .NET Framework 3.5. Using a beta development tool may be ok, using a beta .NET Framework in a production environment is usually not.
1 This crash is supposed to be caused by using raster fonts for the code editor, but it has happened to me without using this type of fonts.
Given that you've said the project will be "tested on another system", the answer is simple: use VS2008. VS2010 solutions cannot be opened by earlier versions, and I wouldn't bet my graduation project on whether or not someone else has VS2010 installed.
Other reasons to stick with VS2008:
VS2010 probably doesn't gain you much.
There are bugs, and I'd rather be working on getting my graduation project done rather than working around problems with my development tool.
If you need help along the way, those that can potentially help probably aren't using the same version. That may make a difference, it may not.
Another thing to consider.. usually the EULA prohibits you from deploying and/or shipping a product using a Beta version of the toolset. I'm not sure this applies in your situation but it's a point to consider.
Another potential issue I've heard of is that sometimes Visual Studio betas refuse to uninstall when it comes time to put in the RTM version. So as long as you don't mind reinstalling Windows when you're ready to install RTM and you've taken the other answers into consideration, then go ahead.
Since your project is for a graduation project and not for full production release, I would say use the latest/stable version of Visual Studio 2010.
You will gain more than you will lose as you will be using the latest technology which will be more useful going forward.
There is an issue for touch screen machines which may render WPF applications unusable.
A workaround exists. See details:
‘MS.Win32.Penimc.UnsafeNativeMethods’ Threw An Exception
fix: C:\Windows\Microsoft.NET\Framework\v3.0\WPF>regsvr32 PenIMC.dll
The biggest problem I have with VS2010 Beta 2 is designer. The Windows Form Designer generates buggy code (Microsoft Connect bug id 507267 and 499925). So I have to edit the form in older version of Visual Studio
I have a few other problems not related to code lose, like random crashing and wizard disappearing.
I've just spent two weeks in VS 2010 beta 2 doing some serious prototyping work. It all went pretty smoothly, and I really like VS 2010. At the end, I moved all the code back to VS 2005 and integrated it with my current project. My experience:
Moving the code back to 2005 was pretty easy. I did try not to use any C# features from 2008 or 2010. The only thing I missed was C#'s implicit properties, but those are easily fixed.
Yes, the project and solution files are not backward compatible. To migrate back, I just created new projects in 2005, and pasted the source files in through Visual Studio. Worked like a charm.
I did find one thing that would consistently crash 2010. If you use the splitter to view two different sections of a file at once, and cut-and-paste from one pane to the other, VS 2010 will roll over and die pretty quickly (not necessarily at the time of the cut-and-paste, but very soon afterwards).
There are some nice productivity features in 2010. You can drag a tab out and make it a window. In Windows 7, you can drag it to the top of the screen to maximize, or to the side to use have the screen. Dragging one file to one side of the screen, and another file to the other side, means you get the whole screen to edit two files, side by side. Very nice. (Even better on two monitors, but I was on a laptop.) The "Quick Find" dialog can now be docked -- that's a huge improvement.
As others have mentioned, use source control, but VS 2010 really is not unstable enough to be any more of an issue than VS 2008. Note that Team Foundation Server 2010 is also available in beta, and will be part of all MSDN subscriptions. It installs under Win7 and Vista. I'm using it for source control on my laptop! Team Explorer is integrated into VS 2010.

Resources