Every time I get to a point where I need to commit the code I've been working on (a.k.a 'The Check In Dance'), I typically ALT+Tab over to the explorer window where my source working directory is located. From here I execute our build.bat file that runs the developer build process that compiles the code and runs all the unit and integration tests locally before committing my changes.
I'd rather stay in Visual Studio to do this so I Googled for a solution and of course found that some smart person has already done this. I found Laurent Kempe's blog and he uses PowerShell to execute a batch file from within Visual Studio.
Simply install PowerShell (if you have not done so already). In Visual Studio's solution explorer, find your batch file, right-click it and choose 'Open With...'. Point it to the PowerShell.exe (located after installation by default in %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe). Make it the default app to open that file type with, and it's done. Every time you double click it, PowerShell will execute your .bat file.
I try to keep my hands off the mouse and on the keyboard (home row preferably for shortcuts and such) while coding. This includes doing The Check In Dance. With this tip, I'm able to use the Ctrl+Shift+N Resharper 'Find File' shortcut, punch in build.bat, hit enter, and the build runs. Nice.
You may already have a different/more clever way of doing something similar. If so, leave a comment or better yet, blog it. Thanks to Laurent's blog post, I was able to find a solution in a couple minutes. Thanks Laurent for sharing this tip!
