Reputation: 2982
I'm using Firefox as my default browser but when working in Visual Studio, I'd like to fire up IE when I go in debug.
We all know that in MVC application, there's no way to choose the default browser unless you add a web form file, right click it, select browse with and then force a browser to be the default one. Great.
My simple question is: where does VS stores the browser I just tell him to use (registry? project file? some xml config file?) I'm asking because VS loose this preference several times a month. I'm fed up with making the brower trick again and again.
Thanks in advance, Fabian
Upvotes: 5
Views: 1559
Reputation: 8934
Alternately you can use this extension: http://visualstudiogallery.msdn.microsoft.com/bb424812-f742-41ef-974a-cdac607df921/
Suggest from question: Visual Studio opens the default browser instead of Internet Explorer
And, yes. This works with ASP.NET MVC applications as well.
Upvotes: 0
Reputation: 43974
I found these settings eventually.
They are stored in an XML file called browsers.xml in thge following directory:
**C:\Documents and Settings\%USERNAME%\Local Settings\Application Data\Microsoft\Visual Studio\9.0**
The XML should look like this:
<?xml version="1.0"?>
<BrowserInfo>
<Browser>
<Name>Firefox</Name>
<Path>"C:\Program Files\Mozilla Firefox\firefox.exe"</Path>
<Resolution>0</Resolution>
<IsDefault>True</IsDefault>
<DDE>
<Service>FIREFOX</Service>
<TopicOpenURL>WWW_OpenURL</TopicOpenURL>
<ItemOpenURL>%s,,0xffffffff,3,,,</ItemOpenURL>
<TopicActivate>WWW_Activate</TopicActivate>
<ItemActivate>0xffffffff</ItemActivate>
</DDE>
</Browser>
<Browser>
<Name>Internet Explorer</Name>
<Path>"C:\Program Files\Internet Explorer\IEXPLORE.EXE"</Path>
<Resolution>0</Resolution>
<IsDefault>False</IsDefault>
<DDE>
<Service>IExplore</Service>
<TopicOpenURL>WWW_OpenURL</TopicOpenURL>
<ItemOpenURL>"%s",,0xffffffff,3,,,,</ItemOpenURL>
<TopicActivate>WWW_Activate</TopicActivate>
<ItemActivate>0xffffffff,0</ItemActivate>
</DDE>
</Browser>
<InternalBrowser>
<Resolution>0</Resolution>
<IsDefault>False</IsDefault>
</InternalBrowser>
</BrowserInfo>
The <IsDefault>
tag determines whether or not the browser is used for debugging.
Upvotes: 1