Change default web browser in Visual Studio - visual-studio

I'm trying to change the default browser to Chrome at VS Community 2015, I'm not talking about release browser, but the browser that opens when I press CTRL-Click. It opens automatically on Internet Explorer.

Click the drop down icon next to "Start" project button and choose your web browser

To change the source default editor:
Tools -> Options -> Search for "browser" -> View Source in "external editor" -> put the path to your preferred.

This is how:
Right-click your html file -> Browse with -> Click on your favorite
browser -> Set as Default.
Note that the next time you'd right-click your html file, you'd still see it says: "View in Browser (Internet Explorer)", but clicking it will actually browse with the default browser we set above.

To set "Google Chrome" as default browser in visual studio 2022
Click the drop down next to "Start" project button
Click on "Browse with"
You may find only "Internal Web Browser" & "Microsoft Edge"
Click "Add" to introduce "Chrome" as browser
Find the location of "Chrome" ex : C:\ProgramData\Microsoft\Windows\Start Menu\Programs
Select "Google Chrome"
Click "OK" in dialogue box
Select "Google Chrome" & Click "Set as Default" in dialogue
Now when you click Start button application will appear in Chrome browser.

in visual studio 2022 Click the drop down next to "Start" project button and click on "Browse with" and choose your default browser

None of this produces the result of changing the Browser used by VS to view an html file from View -> Other Windows -> Web Browser.
Options shows path to Edge but does not actually work. Still attempts to use IE resulting in url "https://learn.microsoft.com/en-us/" being loaded into VS.
OR may I am just dense and am unable to read or follow what has been stated here.

Sometimes the view in browser will not be available in context menu. Follow instructions in How to add the view in browser option back into Visual Studio 2017 context menu? and then come back to this

After spending 5 minutes searching online and not finding what I want, I dug into the Visual Studio interface and found it:
The internal web browser in Visual Studio 2019 (at least), is in View => Other Windows => Web Browser, or CTRL+ALT+R on Windows.
EDIT: According to the Microsoft Documentation, you can send the web browser command to devenv directly using nav, i.e.
devenv /command "nav https://learn.microsoft.com/"

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.

Visual Studio 2010's "Browse With..." keeps forgetting my custom entry. Any way around that?

I'm trying to create a custom entry in Visual Studio 2010's "Browse With..." dialog for debugging in Chrome's Incognito mode (basically, so I can debug without cache or cookies).
So, I open the dialog, click "Add", enter the details:
Program Name: "C:\Users\[my-username]\AppData\Local\Google\Chrome\Application\chrome.exe" --incognito
Friendly Name: Google Chrome Incognito
I click "OK". The --incognito flag prompts the dialog: "File name...contains parameters that cannot be validated. Do you want to change your entry?" I click "No", because I know the command is correct (and because it's the only way of continuing).
The new entry shows up in the list, I click "Set as Default", I click "Browse", and my site opens in Google Chrome Incognito just like I wanted it to.
However, the next time I debug, the site opens in my previous default and if I reopen the "Browse With..." dialog, my "Google Chrome Incognito" entry is gone.
Extremely frustrating. Anyone know of a solution?
I looked into the WoVS Default Browser Switcher extension, but it doesn't seem to allow the creation of browser settings.
I also gave this approach by Scott Hanselman a shot. But Visual Studio keeps resetting the browsers.xml file.
Try creating a batch file and add the following (change the path if required):
START /d "C:\Program Files (x86)\Google\Chrome\Application" chrome.exe %1 --incognito
The first argument (%1) is the URL.
Now use this batch file as the "Program name" when you set the 'Browse With' option.
Note: I use Visual Studio 2010

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