Visual Studio: How can I start the development server WITHOUT opening a browser window or seeing a warning?

1.5k views Asked by At

Visual Studio 2010 Professional

So I want to be able to "Start Debugging (F5)" or "Start Without Debugging (Ctrl + F5)" without a) Opening a browser window or b) Getting an error message from Visual Studio

I tried the following:

  1. Setting "Start Action" to "Don't open a page. Wait for a request from an external application"

    This works great for debugging, however if I start without debugging I get this error message every time:

  2. Setting "Start Action" to an external program that doesn't do anything. This works great for starting without debugging, however if I try and debug then the debugger starts and stops immediately.

I don't even understand that VS error message. I'm "Starting Without Debugging"... of course there's nothing to debug! Stop bothering me!

Thanks in advance!

1

There are 1 answers

0
burkemw3 On

I can provide a workflow that only opens a browser window when you first start a development session. I know you don't want to open a browser window ever. If this is a workflow preference, then I have found the solution below good-enough for myself.

I keep the start action as 'Current Page'. When starting a development session, I use 'Start Without Debugging' to start the ASP.NET Development Server, and a web browser. I close the web browser, but the Development Server remains running and continues to server requests for your application.

If the debugger is not attached, and I make a code change, the I use 'Build Solution (F6)' to rebuild, and the Development Server uses the newly built binaries. Changes to views are automatically detected and re-compiled.

To debug, I use Debug -> Attach to Process (CTRL + ALT + P for me) and find the correct running WebDev.WebServer40.EXE process based on the port.

The Development Server remains running as long as the solution remains open in Visual Studio.