Running Current
Project’s Executable
Provided by: FMS Development Team
Overview
Every now and then
when I am working on a project, I find the need to just run the executable.
I don’t want to debug
it hence I use Ctrl + F5 which works great.
However, if I have
multiple projects in my solution then Visual Studio compiles all of them,
while I just wait. It would be efficient to have a menu item to just run the
executable, under Debug -> Start without compiling.
Steps
-
Start Visual
Studio.
-
Navigate to menu
Tools -> External Tools
-
Press Add
-
Change Title to
“Start without compiling”
-
For the Command,
use “explorer.exe” (which is actually Windows Explorer)
-
For the Arguments,
use this string : $(ProjectDir)bin\Debug\$(TargetName)$
(TargetExt)
-
For the Initial
Directory use this: $(TargetDir)
-
Press OK and
return to Visual Studio.
Now click Tools ->
“Start without compiling”
If the executable is
found, explore tries to run it and warns you about malicious code.
If this executable is
something that would reformat the hard drive then don’t run it, otherwise go
ahead and run it.
A slight twist to the
above can be that for the arguments just use $(ProjectDir)bin\Debug\
And explorer will open
that directory for you, instead of running the executable.
Now no more waiting
for compilation or starting explorer separately and browsing to the
directory.
Just click and run.
Return to the tips page |