Visual Studio将打开默认的浏览器,而不是Internet Explorer
当我在Visual Studio中调试时,Firefox打开,并且由于Internet Explorer和Visual Studio的连接而令人讨厌,例如,当我们关闭启动调试打开的Internet Explorer浏览器时,Visual Studio将停止调试。如何在不必将Internet Explorer设置为默认浏览器的情况下使Visual Studio打开Internet Explorer?
解决方案
回答
右键单击一个aspx文件,然后选择"浏览方式"。我认为这里有一个选项可以设置为默认值。
回答
Scott Guthrie在如何更改Visual Studio的默认浏览器上发表了一篇文章:
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.
但是,我不喜欢这样的事实,即事实并非如此。
回答
在解决方案资源管理器中,右键单击任何ASPX页面,然后选择"浏览方式",然后选择IE作为默认设置。
注意...可以使用相同的步骤将Google Chrome添加为浏览器选项,也可以选择将其设置为默认浏览器。
回答
对于ASP.NET MVC也可能会有所帮助:
In an MVC app, you have to right-click on Default.aspx, which is the only ‘real’ web page in that solution. The default page displays ‘Browse with…’
从http://avaricesoft.wordpress.com/2008/08/04 / ...
回答
快速说明:如果项目中没有.aspx(即XBAP),但是我们仍需要使用IE进行调试,只需在项目中添加htm页面,然后右键单击该页面即可设置默认值。它很hacky,但是可以用:P
回答
在Visual Studio 2010中,默认浏览器会经常重置(大约在每次IDE设置更改时,甚至在重新启动Visual Studio之后)。现在有一个针对2010的默认浏览器选择器扩展,可以克服这一问题:
!!!更新!!!似乎根据@ Cory,WoVS默认浏览器切换器不再免费提供。我们可以改用Default Browser Changer,但我尚未对其进行测试。如果我们已经有WoVS插件,建议我们备份它,以便以后安装。
以下解决方案可能不再起作用:
WoVS默认浏览器切换器:
http://visualstudiogallery.msdn.microsoft.com/en-us/bb424812-f742-41ef-974a-cdac607df921
编辑:这也适用于ASP.NET MVC应用程序。
注意:安装此扩展程序的一个负面影响是,它似乎每月大约更新一次。这导致一些人将其卸载,因为对他们而言,它比解决的问题更麻烦。无论如何,它都可以通过扩展管理器轻松更新,但我仍然觉得它非常有用。
启动VS时,我们会看到以下错误:
The Default Browser Switcher beta bits have expired. Please use the Extension Manager or visit the VS Gallery to download updated bits.