Visual Studio 2008 Hangs - visual-studio

Visual Studio 2008 hangs a lot on my machine. I work in an team environment using Team Foundation Server and when the server has issues VS hangs forever, sometimes if I have two instances open one of them will hang even if TFS is working. I try to disconnect from TFS and work offline but even that hangs my VS. Is there any way to make VS more responsive in case TFS is down?
I have a quad core i5 CPU, 8gb ram, and am running locally (not in a VM).

This might help you set VS to work offline and should help with the server timeouts. Also kick the sys admin of your TFS server, it shouldn't be that unreliable.

Sometimes this is caused simply because the TFS dialogs appear off-screen and it appears to hang. If pressing Esc "unfreezes" Visual Studio, then this is likely the problem.
I found the solution at: http://www.imiscommunity.com/visual_studio_2008_hangs_tfs_compare_dialog_not_visible

TFS can be a serious nuisance when developing a solution that is used by many team members. Without knowing more specifics about your setup, I would ask a few more questions:
What is your machine spec?
Are all other developer machines the same spec? Do they experience the same kind of issues?
Have you tried watching the CPU and Memory usage in Windows Task Manager to determine the amount of resources being used?
In summary, I have found that this can often be down to a number of reasons. As a contract developer, I have to use many different systems from the latest desktop with 12GB of RAM and an i7 processor, through to Virtual Machines on a server (my preferred choice because it is scalable and easier to snapshot), down to using older machines that are insufficient for the task (one of the distasteful parts of the jobs is having to request an upgraded machine).
I suggest reinstalling you development environment from scratch, including operating system and everything. Make sure the hardware is the best you can get, and install on a virtual machine instance on that development machine. That way you can take incremental (albeit slightly large at a fair few GB) backups that will prove handy should you come across an issue.
BTW the most common problem I had was with Visual Studio plug-ins on a system that lacked sufficient RAM. ReSharper was my biggest offender as it compiles regularly in the background in order to highlight bugs - but personally I would not code without it now.

Related

Emulate low physical memory in Visual Studio

I am attempting to debug a performance problem that a customer is experiencing by reproducing it in-house. We suspect that the problem is that the customer has a small amount of physical RAM and the program is paging to disk. This is causing very slow reports.
Is there a way to get Visual Studio to emulate this behaviour when I debug? I would like to closely reproduce in house what I have seen at the customer so that I am sure that I am actually fixing the relevant problem.
Using Visual Studio Enterprise 2015 (14.0.24720.00 Update1)
with ReSharper Ultimate 2015.2 (103.0.20150818.200216)
I would suggest creating a Virtual Machine for this, you will then be able to specify exactly the amount of memory/CPU that the machine is to have. The OS will see this as physical limits, so you will be able to tweak it up and down easily without having to build/reinstall any OS (but would need to restart VM most likely).
For this kind of thing I use the free version of VMware Player, which will happily build a VM from install media.
HTH

Anyone Experiencing Slow Builds With VS2010?

We've recently upgraded to the final release of VS2010 and are experiencing very slow build times compared to the same code under 2008. I was wondering if anyone else is experiencing the same so I can work out whether it's just our environment or not? A few details:
Using VS2010 Ultimate on Windows 7 with fairly beefy machines, talking to TFS 2010.
The solution has been upgraded from VS2008 but still builds against .NET 3.5 and ASP.NET MVC 1.0.
It doesn't seem to be the compilation itself taking long but something else in the build process. This is because even projects that are up to date and don't need compiling are taking a few seconds or so to process.
It's not due to an Visual Studio addin because a couple guys in the team haven't installed any.
The first build after loading VS2010 is pretty quick, then they seem to slow down over time. For example on of the projects in my solution just took 00:00:00.08 to process after a restart. (The project was up to date and didn't need compiling) I then immediately hit rebuild and it jumps to 00:00:01.33.
We're also experiencing the problem with another solution that uses .NET 4.0 that was building perfectly fine under VS2010 RC.
There are no build events or anything like that I can blame, just straightforward assembly builds.
The IDE is not very responsive during the slow builds.
Anyone else has similar problems?
Update: It looks like the resolving assembly references is taking a long time. Looking at the MSBuild diagnostic output or the example above the first build has 30ms for ResolveAssemblyReferences, the second build has 800ms. Subsequent builds seem to be taking longer copying stuff around, e.g. CopyFilesToOutputDirectory jumps from 1ms to 27ms.
Found the problem; turns out it was a rogue build task causing the problem. In my MVC website project I was using the YUI Compressor task from http://yuicompressor.codeplex.com/ to compress my script files and copy them over to my JavaScript unit test project. Everything was fine until this ran, but as soon as it ran it slowed down builds of all other projects! Even rebuilding single projects in the solution and going nowhere near the MVC website were slow. Must be a leak in the task or something like that...
I'm also experiencing extremely slow responses generally from VS2010. I can type in a phrase, sit back and watch it typed out onto the screen a couple of seconds later. Using it's internal web server is extremely slow even when not debugging. It's unusable.
Running it on Win7 Professional x32, with a web project built on .NET 4.0, converted from .NET 3.5 on VS2008 which ran fine but was when I was using W2k3 as my development machine to keep the speed up.
All these are run as virtual machines using the latest version of VirtualBox (currently V3.2.8 r64453) on Linux Ubuntu 10.4 x64 on a massive machine. 2 x Intel i7 2.8GHz (8 virtual cores), 12GB RAM, NVidia 9600 GPU with 512MB RAM.
VM is set up to give 2 cores to Win7 and 4GB RAM and 96MB Video RAM. VT-x, 2D & 3D Acceleration and Nested Pages are enabled.
VS2010 has been tried with and without Hardware Acceleration (as it uses WPF to display it's text editor! [why???]). With, you lose the text editor and menu bars; without, you get a barely usable system. I also have Reflection and Visual SVN installed. The machine is used for nothing else. Anti-Virus is run manually to keep the load down!
[Rant Warning:]
VS2010 runs like a dog and if it wasn't for the fact I've spent 11 months on this project for a client I've been working for for 7 years, I'd be redeveloping in PHP on responsive tools. I left M$ OS's for my business OS 2 years ago precisely because of freezes, slow downs and inexplicable changes taking weeks out of my productivity. Cost wasn't the issue, it was service.
[Rant Over]
I'm aware there are 3 items to this, VirtualBox, Win7 & VS2010. It may be best for me to set up a Win2008 server VM and install VS2010 on that, I don't know at this point.
If anyone has any clues how to get VS2010 to respond in a timely fashion I'd love to hear them.
Craig
I had some extremely slow build times on a solution that included an MSUnit project (with only about 5 tests in it). The tests were not set to run on each build or anything like that. When I unloaded the project, the build became much quicker.
Just for anyone's sake. I had slow compilation times because of an extension, disabled extensions and 10 x more speedier (probably a bug in one :s)
I had the same problem one week ago. Reinstalling .NET 4 framework helped me.
Had the same issue, solved it by changing my default browser from IE to Chrome.

Vista, Visual Studio and OutOfMemoryExceptions

I'm having a bit of a problem where VS won't build because I get OutOfMemoryExceptions. My Vista box with 2 GIG RAM, is using about 1 Gig of RAM when it starts up, and I am not even doing anything (just connecting to the network drives at work etc)
When I then run Visual Studio devenv.exe peaks at around 730MB after a few builds, and I get the error, mostly needing a restart to rectify.
I have disabled Aero and stopped as many unneccessary services and applications in MSCONFIG. I know there is something about Vista using memory and not being bloated, but using up half my memory after just starting up seems a bit excessive (it is the same on a few dev machines).
What sort of peak memory is your application generating and what can I do to try negate this issue?
730 megs after a few builds is not normal.
Some things to try:
Disable all your VS plugins
Ensure VS is running the latest service pack (are you on 2008 SP1)
Try one project at a time to see which one is hogging the memory
Best way how to solved this, is buying more memory.
I have same problem with XP and 1GB memory and it's nightmare for me. Now I have 3GB and it's OK and I can 2 VS in same time.

How is Visual Studio 2010 performance compared to 2008?

Thinking about installing Visual Studio on my Asus eee 1000HE. Since it is not a very powerful machine, I am wondering if I should install 2008 or the new 2010. Looks like there has been a lot of changes done to the UI, etc. Does that mean that it now runs smoother as well? Or is it actually heavier to run?
Considering that VS2010 is currently only available as a CTP release, I'd install VS2008.
Once VS2010 is fully released, without debug information and with optimizations enabled, ask this question and consider using it. For the moment, if you have 2008, use it. I doubt 2010 will be faster on your 'slow' hardware.
2010 is much slower on older machines in my opinion. I am running it currently on a Dell 700m with 512MB of RAM and while it does run, it feels sluggish and significantly slower than Visual Studio 2008. (Remember that it is a beta though, I am sure that performance tweaks are forthcoming)
It is a little bit more difficult to judge the performance differences since you are running it in a virtual machine at this time (no stand alone beta out yet).
Edit: If I am incorrect on the inability to run it outside of a virtual machine I apologize and stand corrected.
Does that mean that it now runs smoother as well? Or is it actually heavier to run?
This is an old post, I know, but I just had to chime in and laugh: lol
I had a pretty decent overclocked Wolfdale-based machine I built for gaming. Fast enough for virtually everything I need to do on a computer, except for editing text files in Visual Studio 2010. Just scrolling up and down in a C# file maxed out one of my cores. No joke.
So I upgraded to the new Sandy Bridge 32nm CPUs (3.3GHz, unlocked model) in an enthusiast motherboard, with 8GB of Corsair RAM, and scrolling moving the cursor around in a text buffer in VS2010 is using 30% of the CPU (that's right, it's using multiple cores). This is with no plugins and outlining turned off.
Vim in the same file, doing pretty much anything I can think of, shows 0% CPU usage, always.
VS2010's editor performance is absolutely shameful. There's no other word for it.

How is your Development Environment Set up?

Curious to know how people set up their personal and/or work development environment, in terms of:
Do you just have all of your developer tools (for example Visual Studio, SSMS, etc.) installed on your main operating system;
Do you use Virtual Machines to have a separate "clean" dev environment that consists only of the OS and one compiler you're working with;
Do you have multiple OS's in a multi-boot system;
Do you remote connect to a separate machine with your developer tools installed on there
It all depends on the type of the job i guess. Here is how my setup is:
The main PC. The one on my desk. Has everything on it.
The secondary machine. Runs Vista.
A bunch of "Clean" VMs for testing. Typically 2 machines of each OS we support.
A build machine. VM with no installed product. Just source code and some compilers.
A dedicated "Server" to host the server app and the DB. [Our product is a client-server thingy]
[On top of that, my primary and sec machines have the server and DB running too.]
EDIT: By "clean" i mean that they only have a freshly installed OS on them, nothing else. These are non-persistent and go back to clean state on shutdown.
I am running what I think is a fairly standard Agile C# development environment. Vista SP1, Visual Studio 2008 with Resharper 4.1, SQL Express 2008, Subversion server, command line svn client and Cruise Enterprise (unbelievable product) with 1 server and 1 agent for continuous integration.
I am running on a Dell XPS core 2 duo 2.4Ghz laptop with 4GB of RAM and 1 external 22" widescreen monitor.
I have tried and tried and persisted with VMWare Workstation (mostly but also Virtual PC) but I again and again resort back after tiring with the performance and annoying delays in Visual Studio. And I have tried every performance trick and tweak in the book available to me. It apparently just needs either more hardware than I have or far more patience.
I have also tried running 64bit Ubuntu with VMWare Worstation server running Vista (vlite'ed) and also windows XP (lite), but I found it just as annoying.
If you have similar specs to what I described then I can simply recommend not going down the VM path, unless it is ABSOLUTELY necessary.
I have a VMWare network replication of the main servers in my environment including SQLservers, Web-Servers, a copy of my dev box, and AD Servers. I also use VS on my dev box for simple things that don't need as much testing.
We use Virtual PC's for our development. As well as a VP for our build environment. The reason for this is so that we can switch between different projects without losing time. (for Support)
At our current client, we have an ESX server with virtual machines running on it. We access the virtual machines through Remote Desktop.
For my style in VS 2008, I use VibrantInk by Rob Conery.
We have Reflector and all Sysinternal tools available on all virtual machines.
I'm planning to have ReSharper on every machine also.
Firefox/Firebug combo is installed on every machine.
Web Developer for IE7 is also installed on every machine.
Cheers!
I really enjoyed using a single VM for each IDE I worked with, but that requires a beefy machine. However, my company has taken recently to the idea that the developers can do "just fine" with sub $500 machines. Thus, my current setup is everything on my only machine.
All of my tools are on my local machine. I generally work within the MVC mindset.
VMWare is set up on my machine, but it's only used on rare occasion for things beyond the control of my machine.
My work is primarily done on a windows machine, with Visual Studio.
I have Visual Studio 2005 and 2008 running on my main machine (Vista :p), and everything I can develop here without cluttering the machine, I do. Feels so much more responsive than in a VM. I have a VM for Linux-based development and several VMs for testing purposes. I never tested VMWare's debugging feature (run the debugger on the host and the debuggee on the guest), though I can imagine that that would be a good reason to have Visual Studio on the host, even if you don't care about responsiveness.
I have a number of IDEs and server products running on my main workstation. I also have a remote access laptop that has all the same critical software on it so I can develop locally (and not depend on Citrix and Remote Desktop to work on code fixes outside the office).
My main work system
Linux x64 dual core
Dual monitor
Redhat based OS
Vim, Kdevelop, Eclipse(with Epic, and Subclipse).
My system is similar(arch, and OS) to our servers, which is what I implement code for. Since I work for a small company with many hats, I tend to have a ssh'd mysql connection open in one window, with a vim screen open on the other side. Throughout the day I use SSH, VIM, SVN, firefox, and e-mail daily.
I put all toolchains and other apps needed to build my code into revision control, and write makefiles for all projects such that the version of the tools from the repository is used, not whatever may be in the $PATH. So when I do a label for a release, it includes everything needed to do the build, and depends on build machine setup as little as possible. All I need to do is sync to revision control, and type 'make'. Unfortunately this does require having cygwin installed on Windows, but personally, I consider a Windows machine just about unusable for development without cygwin, regardless of the prerequisites of the build system.
I have simple makefiles to build projects that include platform-specific .mk files. I don't manually create IDE project files. In a couple cases (Rowley Crossworks for embedded ARM development, Visual Studio for self-hosted windows PC development), I auto-generate project files based on my makefiles, as part of the "make debug" target, and then launch the IDE with the generated project. This makes debugging convenient, without requiring parallel maintenance of a IDE-specific project file in addition to my makefile.
I am about to set up a new development environment for a new department.
Build environment (support both Java development and .Net) will be on to separate VMware machines running on the same physical computer. Both images will use 2008 server.
Developer machines will be desktop computers, most likely qith 6 gig ram, big harddrives, 1 or 2 cpu's with dual or quad core, 24" screens * 2, etc., and with 2008 server installed. This to ensure that the developer code is compiled on the OS. Desktops because I want the developers to be able to use VMware to test, etc., without spending to much time complaining about lack of performance with 2 VMwares running at the same time :)
I am trying to figure out the build environment now. Considering Team City, ++. Difficult to find the right one when you want to support multi-platform environment without to much fuss :)
Every developper setup includes a MacBookPro 17" with a 22" lcd screen.
Eclipse is our IDE, and we use VMWare to host our developpement database (oracle) under winXP.
Obviously a lot of your answers are going to depend heavily on what kind of development each person does. Maybe we should be categorizing these? :)
Web Development
I use a VM to run a Linux guest with a development webserver. I use Notepad++ on my host for editing (recent convert from jEdit), and with drive mapping in the VM software (Sun's VirtualBox), my dev webserver guest machine has no problem serving up the ever-changing source files. I also use the Windows XP IE6 VPC image in another VM to test the page in IE6. I use this setup even if I'm not developing a complicated web-app and am simply working on a static HTML page; there are still some quirky differences in behavior between a locally opened file and a served webpage in a number of browsers that make this worthwhile.

Resources