Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where does Visual Studio stores the default browser to use in debug?

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

like image 801
Fabian Vilers Avatar asked Nov 15 '22 10:11

Fabian Vilers


1 Answers

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.

like image 57
codingbadger Avatar answered Dec 22 '22 07:12

codingbadger