How do I set the default browser in Visual Studio 2017? - c#

I don't have the stupid Browse With, and every time i figure out where it's out it only gives me options for Internet Explorer... It doesn't give me an option to change the browser... Strange enough I've already removed Internet Explorer from my PC... How is it still using it...

"Browse With" is still available
You should be able to select the browser you want from the next window, its self- explanatory.

Try this out
First you have to install google chrome
Then go to visual studio and you can see a attach button with combo
on the top of the window
Click the combo to select the browser
You can see a window of attach process
Their you can see a available processes grid and select the chrome
browser

Go To Project
==> open folder
==> select file (ex: sample.aspx)
==>left click
==> select Browse with
==>Select Chrome
==>Click Set As Default
It works

Related

How to fix browser not opening in debug mode?

I am unable to start my web add-in in google chrome or any other browser I clicked on start button which have written IIS Express instead of start it goes into debug mode after clicking the button but nothing happens.
Here is screenshot before starting :
after start mode :
One reason is the your visual studio is not run as ADMIN. You must run visual studio with Administrator Privilege's - to do that on the short cut icon of Visual studio, right click and "run as administrator" - or for permanently check that go to Properties, Click Advanced, then click "Run as administrator" - When you run it this way you see a Label "ADMIN" on the right up corner of the VS.
Now if this is not work, alternative you can run get into the debugger using this call System.Diagnostics.Debugger.Launch();
Create an empty page and make this call on PageStart, then just load this page from your browser
System.Diagnostics.Debugger.Launch();
Check this setting in your web project's settings and ensure it's not set to "don't open a page"
and the reason behind the HTTP Error 403.14 - Forbidden error is the directory browsing feature is turned off. you can enable by following below steps:
Open a command prompt, and then go to the IIS Express folder on your computer. For example, go to the following folder in a command prompt:
C:\Program Files\IIS Express
Type the following command, and then press Enter:
appcmd set config /section:directoryBrowse /enabled:true
In VS2022 you can check/uncheck a flag to launch the web project in the default browser.
To do this, right click on the relevant project in your solution and click Properties. In the menu on the left click Debug, then 'Open debug launch profiles UI'.
In the dialog which appears, select the relevant profile on the left pane, then scroll down to 'Launch browser'. Check/uncheck this option as required.
Alternatively, open the Properties/launchSettings.json file within the project and add the following line under the relevant profiles entry:
"launchBrowser": true,

Visual Studio 2017 keep file open by default

I have an annoying problem with Visual Studio 2017.
Whenever, I open a file using Ctrl+Click navigation, the the file gets opened in purple tab preview mode (for a lack of better term).
Please note: I'm not asking about Visual Studio Code, I'm asking about VS 2017. I know how to change these setting in VSCode. After googling multiple times for VS2017, I finally gave up. Maybe I didn't phrase the question correctly.
Example shown below.
After I click on the "Keep Open" option, the file gets added to the open set of tabs.
I would prefer to have this behavior by default.
Also, it it possible to add this tab to the right of all other open tabs? Currently, it adds itself to the beginning. I prefer to append new tabs to the right/rear.
You can uncheck the Allow new files to be opened in the preview tab option to keep files open:
And there is the Insert new tabs to the right of existing tabs option nearby to add this tab to the right of all other open tabs.

I cannot find my solution explorer in visual studio

I m using visual studio 2012 and my problem is minor .. and that is whenever i create mvc4 web application it doesnot show solution explorer to add class library. only my project gets displayed.
If you are looking for the actual Solution Explorer window you can activate it by going to the View menu and clicking on Solution Explorer.
I was experiencing the same issue. In my case, it got resolved by following the below steps:
Click on Tools.
Click on "Import and Export settings".
Select "Reset all settings".
Click on "No Just reset my setting".
Click on next.
Click on finish.

New Blank Page(XAML) projects = Controls are not showing on the MainPage(only their borders are)

I'm new to Visual Studio and couldn't find my answer anywhere else for hours over the internet..
I'm Using "Visual Studio Express 2012 for Windows" and everytime I create a new project with a blank page (XAML), the designer only shows me the frame of the page with its missing background.
And any control I drag to it, is invisible (I can only see the square border of the control I dragged but no texture..)
This is only happening during design time. On RunTime it actually shows up..
This is happening to me since I had the first fresh install. Just to be clear, I am NOT opening an existing previous project.. I have non. This is the first time I make a project in C# and I'm surprised I didn't find anything useful so far over internet search..
Also tried installing, uninstalling, repairing and changing to different versions...
The problem didn't show on Visual Studio 2012 Express for Desktop, but this product doesn't seem to be fit to my needs.. (I'm trying to also learn how to develop for Windows Store and other products)
The IDE doesn't show any errors or warnings..
Help would be much appreciated!
P.S - I'm running Windows 8.1
You can try Blend to open the project and render the xaml,if the problem appear too, maybe you should check out your graphics card or update driver.
try with this!
Check the following:
Tools -> Options
Expand Text Editor -> XAML -> Miscellaneous
Make sure that "Always open documents in full XAML view" is not checked
Or perhaps the default program for opening .xaml files has changed:
Right-click your .xaml file in Solution Explorer
Click Open With...
Select XAML UI Designer
Click Set as Default button
Click OK
If it's related to the video driver, maybe disabling hardware acceleration will help?
Or you could try Visual Studio Community Edition (http://www.visualstudio.com/, click on the Download button under "Free developer tools"
Did one of these suggestions work?

Start development server not on the default browser

I have ASP.NET MVC 4 application and I am debugging it with the built it development server( not IIS) my default browser is firefox so every time I click on "Debug" it open new firefox tab. I want to check my web on chrome also. what is the easiest way to make it? ( I don't want to change my default browser).
Choose a page in your project and right click and choose browse with and select your browser and set default
In MVC:
If you right click on any page other than default.aspx you will not get the "browse with" option.
So, when working on an ASP.NET MVC application, right click on default.aspx and chose "Browse With..." Then you'll get a dialog that will allow you to change your default browser.
NOTE:
for ASP.NET MVC3 projecs,You need to specifically add a .htm or .html page, and then right click that and choose Browse With and set to default
ALternative:
Default Browser Changer extension
Link
When you are in debug mode and it loads in Firefox, copy the url to the other browser.
Then go to Debug > Attach to Process, and select the process for the other browser and click [Attach].
A different approach using powershell scripts is shown in this blog post.
Ultimately, the easiest approach would be to use Visual Studio 2012 or 2013, which have this functionality built in to the debug button in the menu.

Categories