views:

229

answers:

3

I'm sure this is a simple misunderstanding but I'm trying to change the default browser in Visual Studio 2010 from Firefox (my machine's default) to IE so that VS will stop debugging when the window closes.

Based on ScottGu's post on the subject, I'm expecting a "Browse with..." option when I right-click on an aspx page in my MVC app; but there's no such option.

Also (possibly unrelated), when trying to launch the ASP.Net Configuration, the Cassini Development Server starts, but no browser instance launches. Starting to get very frustrated!

+3  A: 

Asp.net MVC doesn't let you do this

You can only see "Browse with..." when you right click on the Default.aspx on app's root. Otherwise it's just not there.

This menu option obviously isn't stupid and doesn't let you browse a particular view, because it's not up to the browser to request a particular view, but up to a controller that may display some (or any) view... So Visual studio doesn't give you this option on your views.

I suppose it would be best if you've changed your default browser on your development machine.

Robert Koritnik
Man, that's so frustrating. I use Chrome for day to day browsing and IE for development because the integration is so much better between IE and VS. <sigh />
Kieron
+3  A: 

In ASP.NET MVC 1 projects, you have to right click Default.aspx to get the "Browse with..." option.

However, ASP.NET MVC 2 projects do not have a Default.aspx. The best way to change your default browser is to create a standard ASP.NET project and set the default browser using that.

RaceFace
+1  A: 

I'm building an MVC 2 project and encountered this issue. I just created a Default.aspx web form in the root folder, used the Browse With... menu it exposed to set my browser for this particular project to IE, then deleted the Default.aspx. Kind of a pain, but you only (should need to) do it once.

Craig W.
Since writing the original response I've discovered and installed the Default Browser Switcher extension in my VS 2010 environment. Adds a toolbar so you can switch default browser on the fly quickly and easily. http://visualstudiogallery.msdn.microsoft.com/en-us/bb424812-f742-41ef-974a-cdac607df921
Craig W.