Visual Studio opens the default browser instead of Internet Explorer
For MVC3 you don't have to add any dummy files to set a certain browser. All you have to do is:
- "Show all files" for the project
- go to bin folder
- right click the only .xml file to find the "Browse With..." option
Right-click on an aspx file and choose 'browse with'. I think there's an option there to set as default.
Scott Guthrie has made a post on how to change Visual Studio's default browser:
1) Right click on a .aspx page in your solution explorer
2) Select the "browse with" context menu option
3) In the dialog you can select or add a browser. If you want Firefox in the list, click "add" and point to the firefox.exe filename
4) Click the "Set as Default" button to make this the default browser when you run any page on the site.
I however dislike the fact that this isn't as straightforward as it should be.
In Visual Studio 2010 the default browser gets reset often (just about every time an IDE setting is changed or even after restarting Visual Studio). There is now a default browser selector extension for 2010 to help combat this:
!!!Update!!! It appears that the WoVS Default Browser Switcher is no longer available for free according to @Cory. You might try Default Browser Changer instead but I have not tested it. If you already have the WoVS plugin I would recommend backing it up so that you can install it later.
The following solution may no longer work:
WoVS Default Browser Switcher: http://visualstudiogallery.msdn.microsoft.com/en-us/bb424812-f742-41ef-974a-cdac607df921
Edit: This works with ASP.NET MVC applications as well.
Note: One negative side effect of installing this extension is that it seems to nag to be updated about once a month. This has caused some to uninstall it because, to them, its more bothersome then the problem it fixes. Regardless it is easily updated through the extension manager and I still find it very useful.
You will see the following error when starting VS:
The Default Browser Switcher beta bits have expired. Please use the Extension Manager or visit the VS Gallery to download updated bits.