0

It's always bothered me that the same buttons (F6 or Shift-F6) are used to Build a solution or project whether it's a Debug or Release build. For example, if someone forgets to double-check that drop-down first, they could accidentally start a Release build and if the project's configured so the \bin is on a shared dev server as it is in my team, that can screw up other developers as they're working.

What I'd like to do is create two keyboard shortcuts to explicitly Build As Debug and Build As Release, say Ctrl-B,D and Ctrl-B,R so the shortcuts will always do the right kind of build regardless of what the dropdown selection says.

Is this possible in Visual Studio as a keyboard shortcut setting, or would I have to create a macro or something?

East of Nowhere
  • 1,354
  • 4
  • 18
  • 27

1 Answers1

1

You can probably use AutoHotkey to set up your keyboard shortcut/macro. But I wouldn't do it that way. What's to stop a user from accidentally hitting F6, or accidentally pressing Ctrl-B,R instead of Ctrl-B,D.

I'd make a batch file to create the release straight from source control, using MSBuild. Then you don't have to worry about whether everything's been checked in.

See nice answer here to get started with MSBuild, it's not that tricky. You'll find automating the release process is a breath of fresh air. And it will be simple to modify your script to deploy for production.

Community
  • 1
  • 1
demoncodemonkey
  • 11,730
  • 10
  • 61
  • 103