Tag Archives: VS2010

VS2010 Tips #15: Disable IntelliTrace for better debugging performance (VS2010 Ultimate Only)

I recently upgrading ASP.NET MVC 2 solution from Visual Studio 2008 to Visual Studio 2010 (Ultimate Edition). I found that debugging was very slow. Depending on project size, it took around 30 seconds to initialize and another 5 seconds on each page request in my experience.

I tried disabling IntelliTrace (what is IntelliTrace?)

image

and voila! it got its awesome performance back!

VS2010 Tips #14: How change the default browser used in debugging ASP.NET MVC 2 application

Changing default browser used in debugging ASP.NET MVC 2 is a bit tricky in Visual Studio 2010. To use ScottGu’s steps, you will need to add new ASPX page first. But unfortunately if you delete the page then close the application, anytime you rerun the application then the change you did will lost (it backs to use the default browser set in OS).

In my case I have Firefox set as my default browser but I need to use Internet Explorer as default browser for debugging. The trick I do is by doing these:

  1. Open the project properties
  2. Go to Web tab
  3. Set the Start Action to use Start external program and then pass the Internet Explorer executable path and the url as Command line arguments.
  4. Set the Servers’ specific port to the same port set in the url in step 3.

image

(click to view the image in original size)

Make donation to this article:


 

VS2010 Tips #13: How to do multi-targeting in Visual Studio 2010 Express edition

In my previous blog post I wrote that the requirement to enable multi-targeting feature in Visual Studio 2010 is .NET Framework 3.5 SP1 installed in the machine. But why does it not enable the Target Framework dropdown in File -> New -> Project / Web Site dialog of Visual Studio 2010 Express edition? Is multi-targeting not supported in Visual Studio 2010 Express edition?

Visual C# 2010 Express
image

Visual Web Developer 2010 Express
image

If you’re a Visual Studio 2010 Express edition user, unfortunately you cannot take advantage of the Target Framework dropdown in the File -> New -> Project / Web Site dialog (as specified in http://msdn.microsoft.com/en-us/library/bb398197.aspx). But it doesn’t mean that multi-targeting is not supported.

By default Visual Studio 2010 Express edition will create the projects with .NET Framework 4 targeted. To change the target framework you can do it from Project Properties (Solution Explorer -> [right click your project] -> Properties)

Visual C# 2010 Express
image

Visual Web Developer 2010 Express
image

Hope this helps.

VS2010 Tips #12: Patch for Cut/Copy “insufficient memory” issue in Visual Studio 2010

Visual Studio 2010 RTM has a bug in calculating available memory when developer try and do Cut or Copy text operations.

"Insufficient available memory to meet the expected demands of an operation at this time, possibly due to virtual address space fragmentation. Please try again later."

A patch available now for it that you can download from:
http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=29729

More information about this issue and the patch can be found at:
http://blogs.msdn.com/b/visualstudio/archive/2010/06/25/patch-available-for-cut-or-copy-displaying-insufficient-memory-error-in-vs-2010.aspx

Where the heck is Visual Studio Command Prompt?

You got answer on MSDN forums telling you to run devenv /ResetSettings in Visual Studio 2008 command prompt but after searching you computer you can’t find it. Where the heck is it?

Look at below picture, you will be able to find it easily.

image

If it doesn’t help,

Visual Studio 2005
Start Menu -> All Programs -> Microsoft Visual Studio 2005 -> Visual Studio Tools -> Visual Studio 2005 Command Prompt

Visual Studio 2008
Start Menu -> All Programs -> Microsoft Visual Studio 2008 -> Visual Studio Tools -> Visual Studio 2008 Command Prompt

Visual Studio 2010
Start Menu -> All Programs -> Microsoft Visual Studio 2010 -> Visual Studio Tools -> Visual Studio Command Prompt (2010)