How to switch default browser for debug asp.net in visual studio 2008 / 2010? - visual-studio

Since system install the default browser was opera but suddenly become IE in both 2008 and 2010 versions. Default browser in my system is opera. How I can switch make Opera default for debug again?

In Visual Studio 2010 you can right click any aspx file in Solution Exlorer and you get an option of Browse With in the Context menu. Select Browse with and you get the list of browsers in the system. There you can select the default browser.

Add an otherwise unneeded HTML page to your app via right-clicking the project and selecting Add > HTML Page, then right-click that page and select "Browse With" For more detail, see Runscope API Tools' answer here: Set Google Chrome as the Debugging Browser in Visual Studio

Related

Visual Studio 2012 change web browser

If I click control-click a hyperlink in the text editor, it opens the URL in a new Visual Studio tab. I would rather the link open outside Visual Studio in my system's default web browser (happens to be Google Chrome). How can I arrange this?
I'm talking about hyperlinks in code comments.
I am using Visual Studio 2012. I found a similar question dated 2009, however the accepted answer (a macro) doesn't work in Visual Studio 2012.
Frustratingly, this isn't possible in Visual Studio 2012 or 2013.
Bug reported to developers at http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2723548-open-links-in-an-actual-browser Please add your vote!
There is an extension Open in External Browser.
I'm using Visual Studio 2013 Professional. It works for me.
To install:
Go to "Tools" - "Extension and Updates..."
Choose "Online" - "Visual Studio Gallery" on left pane
Type in search field "open in external browser"
Click "Install"
It seems that it is not possible (except if your default browser is IE, so you would not know the difference).
As Anand wrote above, you could ctrl + right click on the link and then select open link in external window (you cannot do that on the start page, only on an opened webpage) but it still opens the window in IE no matter what your default browser is.
Even if you go to TOOLS --> Options --> Environment --> Web Browser, you will notice that it indicated that IE and the internal VS web browser are siblings.
So just copy the URL from the address bar and paste it to your default browser (it's not too much trouble in my opinion).
In VS 2012 Professional, on the toolbar next to the run debug icon, is the word 'Start' which can be expanded. When expanded you have the option to 'Open with...' and you can select the browser to open the web project up in. It does not run the debugger, it only opens the website in the selected browser. (toolbar > Start (expanded) > Open with...)
You can use the default browser switcher application if you are using Visual Studio 2010 for this kind of situation:
On your tool bar menu select "TOOLS"
Then from options choose "EXTENSION Manager"
It will open the extension manager window in the left hand side there are options choose the "Online Gallery" option
In Online Gallery search for "WoVS Default Browser Switcher"
Download it and Install it
After download restart VS
Hope this works best for you
I found a way to change the default browser for all actions in Visual Studio Express 2012 for Web. It's documented here:
By default, Visual Studio uses your default browser to test pages. To use a different browser or Page Inspector, right-click [an .aspx] page in [the] Solution Explorer and then click [...] Browse With [, which] lets you select a browser from a list, add new browsers to the list, or set one as the default browser. (The default browser setting here applies only to the Visual Studio environment and not to Windows.)
This also changes the default browser for F5'ing an MVC project, because I'm used to closing IE to stop debugging. When I let Visual Studio use my system's default browser, I first have to switch back to it from my browser to stop debugging, because closing the browser tab doesn't.
Unfortunately it still doesn't open links in comments in a browser.
I don't actually know what you mean under hyperlink, but you can easily make VS2012 working with another browser by simply.. uninstalling IE9 (Control Panel->Software->Windows components->bye bye IE9).
Well I found a workaround that is not so clean :P
Add a .html file to your project
Open the new .html file and click inside the editor.
Now Goto 'File' > 'Browse With...' from the Visual Studio Top Menu.
In the 'Browse With' Window, select the desired browser and click
the 'Set as Default' button.
Click the Browse button to set the new default selection.
This is what you have to do:
Go to the standard menu toolbar
Click on 'Add or Remove Buttons'
Tick the 'Debug Target' option
VS 2012 -->> File -->> Browse With -- >> Select Browser -->> Click on "set Default" Button -->> Now Click "Browse" Button
Go thru this setting...
Hope this will help you

Change Visual Studio 2010 Web Browser View to Firefox

Visual Studio 2010 has an integrated web browser view: Menu->View->Other Windows->Web Browser. How can I change this browser to FireFox?
Context: My goal is to have my favorite browser, as installed on the hard disk, integrated in Visual Studio. Doing so I could browse my favourite web sites the way I like, while coding. Visual Studio typically fills up my 2 screens, and using this, I could keep my browser in the foreground while not leaving visual studio.
PLEASE! Note: This question is not about the WebBrowser control usable in .NET WinForms/WPF projects, nor about testing my own code in a different browser.
Ok Here is a Manual solution to Add a new Item named Web Broweser in the Other Windows menu...
In the Tools Menu, Select External Tools...
Select Add in the opened Dialog Box...
Now Edit According to the the Fields :
Title : 'Mozilla Firefox'
Command : [Browse to the file 'firefox.exe' in the Mozilla Firefox Install folder (Default = C:\Program Files\Mozilla Firefox\firefox.exe)]
Arguements : [NULL("")]
Initial Directory : [Path to Mozilla Firefox Install Folder (Default = C:\Program Files\Mozilla Firefox\)]
Click on Apply and then on OK.
Note the Serial No. [Index] of the Entry Mozilla Firefox in the Tools Menu.
Now, In the Tools Menu, Select Customize......
Browse to Commands tab.
Select the RadioButton MenuBar and in the adjacent ComboBox, Select View | Other Windows
Select WebBrowser in the Controls ListBox and Click on Add Command...
In the Categories ListBox Choose Tools.
Now remember the Serial No. [Index] of the Entry Mozilla Firefox...
Find the Entry corresponding to External Command Index..and Select that Entry.
Click on OK.
See A new Item External Command Index has been added...
Click on Modify Selection...
Change the Name property to Web &Browser or Web Browser
Click on Close.
Check the View --> Other Windows Menu...You will find Two MenuItems with name Web Browser...
The First Item [Without the Icon] is the Newly created Firefox Shortcut...
I have found the "Always on Top" Firefox extension, which helps to keep Firefox in place and visible while fiddling with the code in Visual Studio.
Get Always On Top.
This helped me so far, even though it is not what I initially looked for.

How to launch silverlight with IE in Visual Studio while Google Chrome stays default for usual browsing

I cannot debug silverlight with Google Chrome. I don't want to change default browser to IE for my normal internet browsing.
How to only ask to run IE when running a silverlight project in Visual Studio ?
In Visual Studio you can specify the browser to use when running a web project. Right click on the start webpage in your web project and click on the Browse With option.
In the dialog that appears click on Chrome and set it to default.
This will not change you default browser in Windows.
Right Click on ClientBin it is in your Projectweb.and change the default browser or remove the un wanted browser then click ok. Thats it.
or
ProjectWeb->Browse with->change the default browser->ok
Or, just install the IETab extension for Chrome, then set it to automatically run the Silverlight page in IE mode.
https://chrome.google.com/webstore/detail/ie-tab/hehijbfgiekmjfkfjpbkbammjbdenadd

Choose browser to launch when debugging ASP.net (Visual Studio)

Is there anyway to have Visual studio start up a certain browser when running asp.net project?
Open any Web Form
File->Browse With...
Select from the list and hit "Set as Default"
yes
navigate to any aspx file in solution explorer
Right click browse
with and set your default browser
See here

How to change the default browser to debug with in Visual Studio 2008?

When you hit F5, the browser windows pops up, how do you set which browser the debugger users in Visual Studio 2008?
Update 1
I have looked for the 'Browse with' option and not found it.
Visual Studio opens the default browser instead of Internet Explorer
Update 2
If you are already debugging you dont have the 'Browse with' option.
Stop debugging and then its there!
Update 3
The accepted answer below is also relevant to changing the default browser to debug with in Visual Studio 2010.
(In the Project Solution window) Right click a page (.aspx, or on a folder)
Select Browse With...
Choose your browser
Click Set as Default
Click Browse
ASP.NET projects:
Right click a webpage (.aspx, or on a folder)
Select Browse With...
Choose your browser
Click Set as Default
Click Browse
ASP.NET MVC 1 projects:
Right click Default.aspx, then follow steps above.
ASP.NET MVC 2 projects:
As there is no Default.aspx, you need to create a Web Form (right-click project > Add > New Item) and follow the steps above.
If you use ASP-NET MVC, you need to right-click on Default.ASPX which will have a Browse With menu.
To permanently make Visual Studio open a project in IE without changing the default browser you can do the following:
Project Properties -> Web -> Start Action
Start external program: C:\Program Files\Internet Explorer\iexplore.exe
Command line arguments: Enter the url of the path to your start page ie http:\localhost\myproject\default.aspx
This won't allow you to debug client side script in Visual Studio though.
If you are using MVC 2 you do not need to create another project, just add component -> webform to the project then:
* Right click the webform
* Select Browse With...
* Choose your browser
* Click Set as Default
* Delete the webform
If you use MVC, you don't have this menu (no "Browse With..." menu)
Create first a normal ASP.NET web site.
I have passed this problem in VS2012. When I can't find "Browse with.." on the right-click of the project, I found it on File Menu -> Browse with. If it doesn't appear, first you have to click on menu bar, then try open file menu again. If it still doesn't appear, you can just go to Quick Launch on the top right of menu bar then type it "Browse with".
In VS 2010 just make the browser as your default broswer in which you want to run your application and there is no need to set anything in visual studio. I did it for google chrome and its working for me. I just made google chrome as my default browser and its working fine. I am almost sure that this should work in VS 2008 also.
First click show all files. Then in the bin folder choose any xml file and then right click and by selecting 'browse with' select your desired browser.
I find that the Browse With.. menu item only appears in Visual Studio 2010 when I Run as administrator. And in that case it is available even while in debug mode.
An easier way to do this is simply by selecting the arrow next to the Start Debugging:
Then in the Drop Down goto Web Browser and select the browser you would like to debug the site with, you can also select Browse with... to set the default as explained in other answers.
ie ---> Tools ----> Internet options -----> Programe ------> Make Defualt

Resources