About the author

Steven Harmansteven harman :: makes sweet software with computers!

For recent posts and more about me, scroll to the bottom.

Subscribe

  • Subscribe to my feed. via RSS
  • Subscribe via email via email

News

Badges

  • Subtext Project
  • Support Subtext

Setting a Default Browser for Visual Studio

My dev box recently decided that all USB devices - along with several other pieces of hardware - were inherently evil and in the end I decided to just repave the machine. It has been about 6 or so months since I first moved to Vista and it was time for a fresh install anyhow.

After reinstalling and configuring my box I sat to do some real work (hey, I gotta' pay that mortgage). So I fired up Visual Studio and got busy. I work primarily on web applications and I have a few browsers installed on my box for testing with Firefox is my browser of choice.

I quickly noticed that launching a page in my browser via the VS debug menu, shortcut keys (F5 or Ctrl+F5), and even the right-click "View in Browser" context item would open the file in Firefox. That made sense since it was my system’s default browser. However before the repave those commands would launch the page in IE... what gives?

Ask Jon!

I turned to my new human driven search engine for an answer:

Me: Jon, how do I tell Visual Studio that I want to launch files using IE rather than my system’s default browser?

Jon: Hmm... I think there is a setting for that in the Tools -> Options menu somewhere. Let me look.

... waiting...

Jon: I’m not sure. I know you can do it but I can’t find it.

Me: OK, well no worries... I’ll figure it out later.

Rather than give up and resort to Google I decided to look around the various IDE menus for myself. Bah! to the 4-Hour Workweek. :)

The Answer

Browse With... As it turns out setting this is quite simple.

  1. Open a WebForm file in VS (anything ending in .aspx will do)
  2. Select the "Browse With..." option from the File menu
  3. Select your preferred browser from the list and click the "Set as Default" button

Now opening, browsing, or debugging a WebForm from within Visual studio will open the file in the specified browser (IE in my case) rather than my system default.

Technorati Tags: , ,

What others are saying.

# Links (8/2/2007)
Gravatar Member Blogs
Aug 02, 2007
.NET Strategy Pattern Data Binding an Enum with Descriptions Validating Users in Active Directory Gotcha
# re: Setting a Default Browser for Visual Studio
Gravatar Brian
Aug 03, 2007
Ironically I had the same problem a few months ago when I rebuilt my development machine. I also blogged about it (http://tinyurl.com/2hygbn) and commented on how how it's such a non-obvious place to make the change. So frustrating...
# re: Setting a Default Browser for Visual Studio
Gravatar Steven Harman
Aug 05, 2007
@Brian: I guess maybe I should have tried Googling for a solution rather than turning to my Human Driven Search Engine :)

Either way, I agree with you that the configuration is in an unintuitive place and should probably be moved into the Tools > Options dialogs with the rest of the config settings.
# Setting a Default Browser for Visual Studio
Gravatar DotNetKicks.com
Aug 05, 2007
You've been kicked (a good thing) - Trackback from DotNetKicks.com
# re: Setting a Default Browser for Visual Studio
Gravatar capgpilk
Aug 06, 2007
My input
# 
Gravatar Denny.NET
Aug 06, 2007
Making Visual Studio and Safari play nice
# re: Setting a Default Browser for Visual Studio
Gravatar Charlie
Sep 06, 2007
Thanks for this post!

I'm not sure why this setting isn't in the options dialog, but all is good with the world now.
# re: Setting a Default Browser for Visual Studio
Gravatar Preethi
Sep 19, 2007
Thanks ...this saved my day.
# re: Setting a Default Browser for Visual Studio
Gravatar Andrew
Oct 02, 2007
Hip hip hooray - thanks for that one. After looking under every VS rock I could think of I ended up trawling through the registry for ages and even uninstalling Firefox to try to force my default browser back to IE, to no avail. Who would have thought. Just goes to show MS is still capable of some excellent UI blunders.
# re: Setting a Default Browser for Visual Studio
Gravatar Steven Harman
Oct 03, 2007
All, glad to hear that you've found this tip so helpful... sharing information is what this blogging thing is all about for me. :)
# re: Setting a Default Browser for Visual Studio
Gravatar Instructor
Dec 08, 2007
Thanks for that post Steven :)

I thought my machine was going crazy when it started launching everything in FireFox but i didn't have 4 hrs to spare like you though :P so i googled it and luckily you had the answer, hehe
# re: Setting a Default Browser for Visual Studio
Gravatar Kritz
Mar 06, 2008
Nice piece of advise thanks!!!!
# Setting the default browser in Visual Studio
Since installing Visual Studio 2008 when I debug web projects VS opened the project in my default browser
# re: Setting a Default Browser for Visual Studio
Gravatar Aaron
Apr 15, 2008
Thanks for this! :)
# re: Setting a Default Browser for Visual Studio
Gravatar Paolo
Apr 28, 2008
Thank you, thank you, thank you.

You saved the day for me.
# re: Setting a Default Browser for Visual Studio
Gravatar Margolis
Apr 29, 2008
Ah. You the king.
# re: Setting a Default Browser for Visual Studio
Gravatar Amar
May 08, 2008
Thank you, even i had tried to uninstall my firefox, even then while debugging VS say that cannot find firefox to open the file :D and i had to install firefox again.
thanks Steven for the solution
# re: Setting a Default Browser for Visual Studio
Gravatar Derek
May 16, 2008
Thanks. I spent a while looking in the options as well.
# re: Setting a Default Browser for Visual Studio
Gravatar Monu
May 19, 2008
Thanks a ton Steven, saved me a lot of time
# re: Setting a Default Browser for Visual Studio
Gravatar AJ
May 22, 2008
Outstanding. This really helps and saves time. IE dutifully closes when you stop debugging, too. Plus, Firefox doesn't get polluted with multiple vs tabs.
# re: Setting a Default Browser for Visual Studio
Gravatar Viktor
Jun 12, 2008
Thanks dude:)
# 
Gravatar Denny.NET
Jun 15, 2008
Making Visual Studio and Safari play nice
# re: Setting a Default Browser for Visual Studio
Gravatar Asher Mehboob
Jun 17, 2008
thanks friend
# re: Setting a Default Browser for Visual Studio
Gravatar HellHead
Jul 09, 2008
Thank you for the solution
# Setting the default browser in Visual Studio
Setting the default browser in Visual Studio
Comments have been closed on this topic.