Why does Visual Studio spins up HDD it doesn't use? - visual-studio

This is something that is bothering me quite a bit, because it slows down VS start up and add to system noise. I have a Western Digital drive that goes to sleep when not in use. This drive is for data only, Visual Studio or any of its components were never installed on it. No files VS solutions use (including source/project files) were ever on that drive. So Visual Studio should not try to access it. But every time I start VS, it causes that drive to spin up. Why does it do that and how can I stop it? This happens in both VS 2008 and 2010, but I'm most concerned with 2010 right now.
Update: Alright, just promoting some new information from comments and updating the intended question.
The reason it spins up the drive is that it queries all drives for available space. Is there a setting for this somewhere? It sure doesn't look like the usual config dialog has it.
Also, for people voting to close. Why would SO have Visual Studio tags (so popular too) if we aren't allowed to ask VS questions?

Related

Visual Studio 2022 randomly started freezing my system

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.

What is vshub.exe in the system tray?

I installed Visual Studio 14. Now I have a new app VsHub in the system tray / notification area. What is it? I tried clicking and right-clicking on it, it doesn't do anything.
According to Visual Studio Blog site (http://blogs.msdn.com/b/visualstudio/archive/2014/08/18/visual-studio-14-ctp-3-released.aspx?PageIndex=2&wa=wsignin1.0):
"The Visual Studio Hub is an executable that supports multi-tool
communication across the VS family of apps, service
composition/isolation, and data/compute outside of the Visual Studio
process."
I solved stopping the folliwing Windows service:
Visual Studio Standard Collector Service
After stop, my pc is returned to work correclty, without strange load.
I hope this help you.
I have a slightly more direct solution to this. It's relatively trivial to locate where VSHub.exe and its cohorts are on your hard disk. Just go into that directory, take ownership of all the .exe files contained in it, and for each of them use "Right Click" / "Properties" / Security, and add an ACL that denies execute permissions to everyone.
Problem solved. You will need to re-do this every time you update VS 2015, but on my low power laptop, I simply can't afford the resources to keep all these unnecessary tools running. VS 2015 runs just fine without them: I can edit, build and debug programs without any problems at all.
Sure, I may be missing some of the more esoteric features of VS 2015, but for my use case YAGNI

Is there a simple way to check out files in TFS from a Mac environment running Sublime 2?

Ok, before I explain in detail, here's my (very odd) setup:
Hardware: iMac
OS: Mountain Lion
Software:
Editor (Mac): Sublime 2
Virtualization: Parallels Running Windows Server 2008
IDE (Windows): Visual Studio 2010
Source Control (Windows): Team Foundation Server
So here's my dilemma.
I looooove Sublime 2. However, being a Microsoft shop at my workplace, I have no choice but to deal with TFS. I don't do a lot of back-end coding, I'm a front-end guy and don't need all the hefty class and structure tracking built into Visual Studio, so Sublime is perfect for me.
One of the things I love about Sublime is that I can hit cmd+p and pull up any file immediately. The alternative is spending several minutes sifting through our file structure to locate the same file (we have a massive project structure...it's a beast).
Unfortunately, I can't just tap cmd+p and pull up any file...I can...but after editing it, I hit save and "uh oh! file isn't checked out, it's read only". I then have to switch spaces, spend several minutes sifting through directories to locate that same file I worked on, and check it out. Switch back, save, and then check it in. It wastes a lot of my time and defeats the time-saving benefits of Sublime's file searching.
What I'd like to know is if there's an easier way to accomplish this. I've tried a few things and none have panned out. I found a plugin that integrates TFS with Sublime - but that only works for Windows. I tried using Eclipse with a TFS plugin, but I still have to browse through a massive directory structure to check out the file in Eclipse before editing it in Sublime.
Is there any way to streamline this process better? I know it might sound silly to go through such extremes to save a minute or two here & there, but when I do this hundreds of times a day, it starts to save a LOT of time!
Thanks in advance to the community for any help on this!
If you can persuade your TFS Admin team to upgrade to TFS 2012 you will have your solution. TFS 2012 supports "Local Workspace" which does not keep files read-only on disk. You download your source code once through Visual Studio or Eclipse and keep working in ANY editor you want. TFS Client tracks changes on the file system and you just need VS or Eclipse to check-in your work at the end of the day.
For TFS 2008 and 2010 you have to check-out your files manually or with the help of a supported IDE. Those versions only support "server workspace"s and that flavour of workspace keeps all files on disk as read-only.
You might have another chance with 2008 or 2010 tough. TFS 2008 and TFS 2010 on Windows platform supports offline working, which temporarily disconnects your workspace from the server to do your work. Then at the end of the day you go back online and TFS client tries to "detect" what changes were made when you were offline and lets you check them in. This blog post says Team Explorer Everywhere supports offline work. You might need to remove read-only flags of files manually. Offline working is not perfect even on Windows platform and you need to be careful until you get used to it but I believe it is worth giving a shot.
If upgrading to TFS 2012 is an option then you probably want to consider it.
TFS2012 with local workspaces no longer require files to be checked out in visual studio first (files are no longer marked as readonly, and vs detects changes from other programs). This will get rid of one of your alt-tabs to windows.
You'd still have to alt-tab back to check in, you could potentially use a commandline "tf checkin" if you don't want to keep visual studio open.
So after trying several suggestions from here, among a few I found elsewhere, I've come to the conclusion that the best setup (for me) is as follows:
Editor (Mac): Sublime 2
Editor (PC): Sublime 2 with TFS plugin
Virtualization: Parallels Running Windows Server 2008
IDE (Windows): Visual Studio 2010 Source Control
(Windows): Team Foundation Server
So as you can see I updated my existing setup with one slight tweak. On my Windows side, I installed Sublime 2 and installed the TFS plugin. If I want to check out a file, I switch to windows, search for the file, check it out via Sublime's TFS plugin, then switch back to the Mac. It's certainly not ideal, and requires an extra step, but it seems to work the best for me and is faster than using Visual Studio to check in/out.
If anyone comes up with a more elegant setup (aside from using TFS 2012 - which thankfully is coming for my organization), I'd love to hear about it. In the meantime, I hope this helps anyone else who might be using a setup similar to mine.

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.

Resources