Setting the default browser inside Visual Studio

My default browser is Firefox, and has been for many, many years.  But that’s not everyone’s favorite browser, nor is the one they have to use all day long.  When developing web applications for clients, it’s important to know what their browser requirements are.  Often, for LOB apps or intranet apps, it’s some version of IE.  In this case, I need to develop my web app using IE.

This caused conflicts for me recently as my default browser is Firefox.  Whenever I would start the app (Ctrl + F5), a new tab would pop up in my Firefox browser.  I didn’t want that, I wanted IE to pop up.

One way to make IE pop up is to change the Web Application Project’s Web settings:

Here I can type in the path to IE with appropriate command-line arguments.  But that’s annoying and brittle, as not everyone has IE in the same location.  This option doesn’t work very well.

Instead, we can set the default Visual Studio default browser, which doesn’t conflict with the machine-wide default browser.  To get this set up, we’ll need to open an ASPX file in our solution.

If you don’t have one, just create one temporarily.  For some reason, this option only shows up when you have an ASPX file open.  The option we’re looking for isn’t anywhere in “Tools->Options”, or at least I couldn’t find it anywhere.

Finally, go to “File->Browse With…”:

This will bring the “Browse With” dialog up:

Select whatever browser you want (IE for me) to be your default, and click “Set as Default”.  Now whenever I start the application from Visual Studio, the correct browser pops up.  This is a Visual Studio-wide setting, so you’ll need to use this property judiciously.

Related Articles:

Post Footer automatically generated by Add Post Footer Plugin for wordpress.

About Jimmy Bogard

I'm a technical architect with Headspring in Austin, TX. I focus on DDD, distributed systems, and any other acronym-centric design/architecture/methodology. I created AutoMapper and am a co-author of the ASP.NET MVC in Action books.
This entry was posted in Tools. Bookmark the permalink. Follow any comments here with the RSS feed for this post.
  • http://www.flux88.com Ben Scheirman

    I’ve always said that a “Random” option should be included there. That way you could rotate between IE, FF, Safari, Opera, and whatever else you choose.

    It helps to force the rendering & javascript discrepancies that creep into your code.

  • http://jeffmixon.blogspot.com Jeff Mixon

    Hidden menus are fun. Thanks.

  • B

    Thanks for all the help here.