views:

75

answers:

2

Visual Studio 2008 can load a solution upon startup. Can it also run it automatically after it loads it? Like clicking on the "Run without debugging' button?

Addition: Michael Mrozek's answer was helpful & accepted. But for some reason, when VS runs, its attaching the debugger. Looking for a way for debugger not to get attached.

A: 

I don't think solutions can be run immediately after being loaded. Why do you need this?

Bernard
Because it takes time to run a big app for the first time after a cleanup, due to compiling all the pages. After a reboot, the machine automatically loads VS. I will save a few minutes if it also runs it.
Tony_Henrich
Why do you ask why?
Lucas B
+6  A: 

DevEnv.exe takes /Run and /RunExit arguments:

/Run         Compiles and runs the specified solution.
/RunExit     Compiles and runs the specified solution then closes the IDE.
Michael Mrozek
It's running it in debug mode. Can it run without debugger?
Tony_Henrich
@Tony I don't think so, but why are you even running it in VS if you want it without the debugger? Just run it from a command-line
Michael Mrozek
I am running it in command line. I get an error message which is the same as when I run it from within VS and debugger. This tells me that the command line is running it in debug mode. (if you're going to ask why I get an error message. The error message is 'Unable to start debugging on the web server. An authentication error occurred while communicating with the web server. ..' and that's because keep-alive in IIS is unchecked and I need it unchecked)
Tony_Henrich
@Tony Oh, you mean you need it to build in release mode? I thought you were asking how to run it without the VS debugger attached. You can give it a configuration name with `/ProjectConfig`; you probably want `/ProjectConfig Release`
Michael Mrozek
no not release mode. I mean like I said in the question. Load the solution and run as if I clicked the 'Start without debugging' button. The /Run option is loading the solution and running it WITH debugging which I don't want to happen.
Tony_Henrich
@Tony Then I'm back to what I said in my comment -- run it from the command-line. Running the `your-program.exe` binary cannot start it with debugging -- Visual Studio isn't even running
Michael Mrozek
I am not running the .exe. I need to have VS running. The whole point is that I want VS running and the solution compiled and the program running. But I don't want the debugger attached. The problem is the debugger is attached. Anyways, thanks for your answer.
Tony_Henrich
@Tony I don't know how then, sorry. You can edit the question to make it more obvious the debugger being attached is a problem and leave the question open (with no accepted answer) to see if someone else knows
Michael Mrozek