Visual Studio opens the default browser instead of

2019-01-03 04:23发布

When I debug in Visual Studio, Firefox opens and that is annoying because of the hookups that Internet Explorer and Visual Studio have, such as when you close the Internet Explorer browser that starting debug opened, Visual Studio stops debugging. How can I get Visual Studio to open Internet Explorer instead without having to set Internet Explorer as my default browser?

13条回答
神经病院院长
2楼-- · 2019-01-03 04:48

Also may be helpful for 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…’

From http://avaricesoft.wordpress.com/2008/08/04/...

查看更多
做个烂人
3楼-- · 2019-01-03 04:50

Quick note if you don't have an .aspx in your project (i.e. its XBAP) but you still need to debug using IE, just add a htm page to your project and right click on that to set the default. It's hacky, but it works :P

查看更多
疯言疯语
4楼-- · 2019-01-03 04:51

With VS 2017, debugging ASP.NET project with Chrome doesn't sign you in with your Google account.

To fix that go to Tools -> Options -> Debugging -> General and turn off the setting Enable JavaScript Debugging for ASP.NET (Chrome and IE).

https://msdnshared.blob.core.windows.net/media/2016/11/debugger-settings-1024x690.png

查看更多
【Aperson】
5楼-- · 2019-01-03 04:52

You mentioned Visual Studio. This is for Visual Studio 2013. In the "Menu and Tools" in the second line , right below Debug you have a dropdown box giving you the list / option of "Emulators" .Your IE should be in the option , select that and you are good to go. Easy way .

查看更多
Bombasti
6楼-- · 2019-01-03 04:53

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

setting MVC3 project default browser

查看更多
神经病院院长
7楼-- · 2019-01-03 04:54

If you're running an MVC 3 application - in your solution explorer click the show all files icon and then under the Global.asax file there should be a file called YourProjectName.Publish.XML right-click it and then click "Browse With..." and select your favorite browser as the default.

查看更多
登录 后发表回答