How to manually * run the last successful build in Visual Studio?

I turned off the "Build failed, you want to run the last successful build" dialog box, and do not want to return it. Is there a way to manually (menu command, macro) run the last successful build without having to start the build? This is useful to show something to another person while I'm in the middle of coding, and I broke the assembly (or just don't want to wait for the next compilation, whether it succeeds or fails).

Running exe in the bin folder does not work, firstly, because it does not have the current command line argument and the working directory settings in the build options, and secondly, I get assertions: apparently, it expects it to be attached to the debugger ( which, I think, we still have with the dialogue "last successful collection"?). This is for Visual C ++ 2010.

+4
source share
1 answer

Tools> Options> Projects and solutions> Build and run> "On when projects are out of date:"> Never build

Here is an AutoHotKey script that I use to switch between “Build Prompt” (using Ctrl + 1) and “Never Build” (using Ctrl + 2).

ToggleBuildBeforeRun(skipBuild) { SetTitleMatchMode, 2 IfWinActive, Visual Studio { Send !to^ebuild{Space}and{Space}run Sleep 800 Send {Tab 4}{Down 2} if (skipBuild) { Send {Up 1} } Sleep 600 Send {Enter} } } ^1:: ToggleBuildBeforeRun(false) return ^2:: ToggleBuildBeforeRun(true) return 
-1
source

All Articles