views:

2605

answers:

8

I don't like to use IE for my system default web browser.

but

I do want to set IE as my browser in VS2010 because it works a little nicer for debugging and I like to develop to the lowest common denominator. (jab, lol)... anyhow, can I default to debugging against IE?

I know in VS2008 you just had to "Browse With..." on an .aspx page. But that option doesn't exist in VS2010 RC. What gives?

+4  A: 

This is for VS2008, but should apply just as well to VS2010.

You have several options.

Go to the web project properties to the "web" tab.

Option 1:

  • Under "Start Action", select "Start External Program" and set the path to your browser of choice, pass the URL in through the command line parameters

Option 2:

  • Setup your machine to use your browser of choice as the default browser.
  • Under "Start Action", select "Start URL". This will invoke the default browser.
Oded
Oh god! That's a terrible step backwards. heh. Oh well. Microsoft is as Microsoft does.Got it working... +1 thanks.
blesh
A: 

Hey just found you can do this in VS2010.

Right click the Web Project and go to 'Browse With' - Set the default browser in here.

Tim
Yeah, that only works in VS2008. I actually knew about that one, as I mentioned in the question. In VS2010, however, I don't see that option when I right click an .aspx file in the solution explorer.
blesh
A: 

No, Tim is right. The 'Browse With' option DOES show in VS2010 - at least in VS2010 Pro.

Steve
Well it didn't exist in the RC... which was what my question was about.
blesh
A: 

The 'Browse With' option does exist. But it is shown in context menu of a file\folder and not in a context menu of whole web application.

You may setup default browser there.

Monsingor
A: 

"Browse With..." Will not show up when you are in debug mode, FYI. That's probably why you think it's missing.

Curtis
+1  A: 

"Browse With..." only appears in VS2010 (aspx page context menu) when you already have IE set as the default browser for everything (system). It's there to let you select an alternate browser to IE.

This is a big #fail in my opinion. I've had moderate success with thtese steps.

  1. Set IE as default system browser
  2. Open VS2010.
  3. Set IE as default browser using "Browse With"
  4. Change your default system browser back to your preferred choice (while VS2010 is still open)

I say moderate results because the settings don't seem to persist or aer randomly persisted at best.

Dave Forster
+1  A: 

The solution really is not that difficult, though it is not as direct as it ought to be...

In Visual Studio 2010, the Browse With option is available. However, it is not available for MVC Views!

Simply add a Web Form or HTML Page to your project, and Browse With is readily available in it's context menu. Here you can set the Default Browser, and that setting will be used for all subsequent debugging.

Peter