VS2010 and ReSharper performances

Below are some tips to improve the performances of ReSharper and VS2010 IDE.

Sometimes it is not just ReSharper causing the overall VS to depreciate the performances, but lot of other factors contribute to this as well. Also think about getting familiar with ReShaper well. Even  though ReSharper causes for a performance decrease, you still code way faster with it. Try to use code snippets, short cut key and being more productive increases the development speed.

Below are few tips to help you maximise the performance of your IDE/ReSharper. Please note that enabling some of the below items you are trading the productivity for the speed of your IDE. If none of the below tips aren’t assisting your problem, then consider upgrading hardware as a last resort.

VS2010

Uninstall Extensions
Disable the un-used extension that you don’t need. Navigate to VS Tools-> Extension Manager -> Disable or Uninstall extension that aren’t used.

VS Hot Fixes
Ensure you have updated performance related hot fixes from Microsoft Visual Studio http://connect.microsoft.com/VisualStudio/Downloads There are evidence that people have downloaded some of hot fixes got performance boost in their development environment.

Project Unload
Unload projects you currently not working on. The less projects means, less source files, less read and writes, hence faster processing speed. You can unload the project that you are not working on.

Remove Navigation Bar
If you are using ReSharper, you don’t need VS2010 to view list of methods and fields at the top of the file (CTRL+ Alt +F does this nicely). Go to Tools | Options | Text Editor | C# and uncheck Navigation bar.

Turn off Track Changes
Go to Tools | Options | Text Editor and uncheck Track changes. This will reduce overhead and speeds up IDE response.

Turn off Track Active items
This will turn off jumping in the explorer whenever you select different files in different projects. Go to Tools | Options | Projects and Solutions and uncheck Track Active Item in Solution Explorer. This will ensure that if you are moving across files in different projects, left pane will still be steady instead of jumping around.

Turn off AutoToolboxPopulate
There is an option in VS 2005 that will cause VS to automatically populate the toolbox with any controls you compile as part of your solution. This is a useful feature when developing controls since it updates them when you build, but it can cause VS to end up taking a long time in some circumstances. To disable this option, select the Tools | Options | Windows Forms Designer and then set AutoToolboxPopulate to False. If you are not using turn off this feature so you get better response time

Turn Off splash screen
When you launch VS2010, it first loads a splash screen. You can disable this and improve the startup time.
Change the  Target path of your VS2010 shortcut to
“C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe” /nosplash

Pay attention to Warnings and Errors
Not a big deal but this also contributes to VS compilation. The point here is, having a lot of messages serialized to output causes slowdown, so pay attention to first sign of your warnings and fix it.

IntelliTrace (Ultimate Only)
Most of you don’t use VS2010 Ultimate Edition, but if you do and if you realise your IDE is performing slow, try disabling IntellTrace.
Tools | Options | IntelliTrace | General. 

Build and Run
When you press F5 to debug an application Visual Studio first compiles the projects, then runs your project and attaches the debugger. You can cut down on the number of projects that Visual Studio builds during this process by checking the Tools | Options |“Only Build startup projects and dependencies on Run” checkbox in Tools\Options. This increased performance of large projects.

Turn off the Startup Page
Tools -> Options -> Environment -> Startup.
You could configure this to “load last loaded solution”, and or remove the startup channel.

Keep your projects nice and clean
Permanently remove unwanted files, assembly references, and project files from the solution. If you need them back for some reason they are in the TFS. Add-Ins like ReShaper constantly compile the code in background, so lesser is the better.

Hardware acceleration
There are some articles on the web which indicates that visual studio doesn’t run well on machines without a graphic card that supports DirectX 9 or with bugs in the Graphic Card Driver. This is due to the new UI which is build on WPF Visual Studio which uses hardware accelerations. You can try to disable it, for better performance. 

Tools|Options|Environment |General Uncheck the “Automatically adjust visual experience based on client performance” checkbox.
For more information please refer to the below link.
http://support.microsoft.com/kb/2023207

ReSharper

As with VS, you could easily turn off the feature you don’t need on daily basis.

– Navigate to ReSharper | Options, select Settings under “Code Inspection”. Ensure Analyse errors in whole solution is turned off.
– Navigate to ReSharper | Options, select Inspection Severity  under “Code Inspection”. There are lot of static analysis features you could turn off. Simply select from the drop down “Do not show”.
– Try disabling ReSharper IntelliSence and use VS IntelliSense instead.
– There were some performance issues with ReShaper 5. As per JetBrains threads, those issues have been rectified. Please ensure you have the latest ReSharper installed.

Downgrading your VS projects from VS 2010 to VS 2008

I know this not what we want to do or what we like to do. We all like to do the upgrade. However there are instances where you have a VS solution file that you created in VS 2010, and when you try to open it in a machine where only VS2008 installed, you cannot open it. I had this problem today and it is quite easy to resolve this issue.

Before you do anything backup your files. Open your solution file in your favourite text editor and change the below Format version to 10.00 and # visual studio version to 2008

image1

Below tool ToolsVersion to 3.5 if you have .NET 3.5 installed.

image2

That’s it save your file and you can open your project and the solution in VS2008. . I hope this tip will be handy for you.

VS2010 Undo Close Documents

I thought this would be quite a nice feature to share with you all.

Prerequisites

You need to download Power Commands for Visual Studio 2010. It is free.

What’s this all about?
You might already know this, if not this is about re opening the closed documents.
There are two ways to this.

1. Re opening the most recent closed document.
image3

If you close one or many opened documents within VS, you can re open the last closed document by navigating to Edit -> Undo Close. Alternatively you can use Ctrl + Shift + Z

2. Undo Closed Window.

You can also see your last closed documents in “Undo Close Window”. You can open this window by just navigating to View  -> Other Windows – > Undo Closed Windows

image4

VS 2010 IDE Enhancements – Quick Start

Below document describes some of the key features and improvements to VS2010 IDE.

Each feature is described in context of What it is? Benefits? How to use it? and any Related information. The main purpose of this document is to provide an easy way for developers to get familiar with new features and technologies.

Note: This guide only covers improvements to IDE. It does not cover VS2010 Test features, Architecture features, Dynamic Data enhancements, MS Ajax, language features such as C#4.0 and  .NET 4.0 Security.

VS2010 IDE Enhancements – Quick Start