ASP .NET Core Web Server console output not visible in VS for .NET Core 2.2 - visual-studio

I created a .NET Core 2.2 web application project in VS 2017 and the ASP.NET Core Web Server option from the console output is not visible when the application runs with IIS Express.
By .NET Core 2.1 web application projects this option is there and it is showing the output without any problems.

I think you have to right-click on Project->Properties.
Then on the right side menu to select "Debug".
In Web Server Settings find "Hosting Model" and select "Out of process"

The simplest option is to change your currently selected debugger run option (the dropdown with the green "play" button / F5) from IIS, to the name of your project (e.g. so that "FooWebApp" shows up now in the dropdown). This way the browser will still open like it was before, but the console window will start showing as well.
On the other route with Tuvia's answer above (thanks!), it's actually Properties/launchSettings.json which stores / determines these actions. There you can also set "launchBrowser": false if wanted, or if you want to change if the console window opens, within "IIS Express" profile, manually add: "ancmHostingModel": "OutOfProcess" (or else set to InProcess).

Related

How do I set something in Visual Studio 2013 Express for Web so that running it in debug mode opens home page?

Running Razor, MVC5, .Net 4.5.1. I have no idea what constitutes a "start page" in MVC within the visual studio development environment. How do I set it so that every time I run F5 my home page opens?
Setting a startup page for MVC5 when debugging
This can be done in the Project Properties.
Open Solution Explorer and find the relevant project.
Right-click on the project and choose Properties (or press Alt+Enter).
Navigate to Web -> Start Action.
Explanation
By default an MVC application has the Specific Page radio button selected and the input box is blank. This means that the application will open a browser to the server with no page specified and MVC will use the default route of /Home/Index.
http://localhost:12345/
You can specifiy a different route. For example you could use Home/About (see image).
This would open
http://localhost:123456/Home/About

MS VS 2010 - Web one click publish toolbar is disabled when code file is viewed

I use VS 2010 and the deploy function and to get quick access to the functionality I showed Web One Click Publish toolbar. But the toolbar is only activated when I open Web.config files or when I open Properties of a web project. When I open C# code file that toolbar is disabled. I think the functionality should be enabled independently like for example functionality Build project.
Is it something wrong in my VS installation or configuration?
I've just found that it is disabled when code file being viewed (active) does not belong to Web project (but to other one instead that cannot be published).

How to make IIS Express the default web server in Visual Studio?

Is there a way to set IIS Express as the default launch option in Visual Studio 2010 SP1? Currently, it uses Visual Studio Development Server by default and one has to execute "Use IIS Express..." command manually.
Right click on the Default Startup project file in your Solution explorer.
Select "Properties".
Click on the Web Tab on the left hand side
scroll down and select the "Use Local IIS Web server radio button
Tick the checkbox "Use IIS Express"
Another useful tid bit in the section is that you can tell IIS not to launch browsers when you debug and just wait for a browser process to hit it. This is really nice for cross-browser testing.
Just above the previous said section, look for a radio button titled "Don't open a page. Wait for a request from an external app" under Start Action section of the same page
EDIT:
To set all projects made to behave this way do the following:
Tools -> Options
Projects and Solutions
Web Projects
Tick "Use IIS Express for new file-based web sites and projects

Default Browser- Visual Web Developer Express 2010

I am trying to debug a Windows Azure WebRole which is an MVC3 project, but I want it to launch in any browser of my choice.
The Windows Azure is set as the Startup Project and launches the MVC3 project WebRole.
I am using Visual Studio Web Developer Express 2010.
I have previously stabbed in the dark by setting the following properties as in the image below but to no avail:
I then decided to set the project to not independently launch a page as above.
Is there a way to setup a default browser with the above scenario AND without changing my Windows default browser?
I've gotten around this in the past by adding in an ASPX or HTML page to the project and then right clicking it and selecting Browse With. You can then change the default browser in there without having to change your default browser within windows.
I haven't tried this with the Express edition however, but I don't see why they wouldn't include it in there.
You can delete the file afterwards and it will still retain the setting.
How about this:
WoVS Default Browser Switcher
http://visualstudiogallery.msdn.microsoft.com/bb424812-f742-41ef-974a-cdac607df921
You right on the page shown in solution explorer and then browse with whatever browser you want to set and add it as default browser.

Why does Visual Studio launch multiple WebDevs when I debug?

I have a Visual Studio 2008 solution with several projects in it - some of which are web applications / sites.
Whenever I go "Debug > Start new instance" for a specific web application and VS launches the ASP.net Development Server (WebDev.WebServer.EXE) for that application, VS also launches 3 additional such processes - one for each of 3 other web applications I have in the solution.
How can I tell Visual Studio to only launch WebDev for the one project I'm debugging? I've looked both in the project configurations and in the solution configuration and could not find the relevant setting...
I think it runs one for each Port -- you can try turning setting them to have the same port - click on the project and look at the properties pane (you have to turn off the the automatic port generation and then set the port#)
I tried the above solution but it did not worked. My solution was a vs2005, what I found to solve the project was to make the property window of VS 2008 visible. Then click on the web projects and then set the "Always start when debugging" property to false and this should take care of it :(
In Visual Studio 2008, there is an entry on the Properties page for the project called "Always Start When Debugging".
Note you have to get to this by selecting the project and going to the Properties pane (or right-clicking Properties). This option is not present when you double-click the project and open it in the main editing pane.
VS by default sets this value to on for all your web projects. Turning it off will solve this problem.
[editorial]This is fairly annoying and I wish the default were false![/editorial]
Suggestion - don't use the internal WebDev, use IIS instead. Also reduces the clutter in the systray. ;)

Resources