1

I program in C#. The specifics of my development process is that i often run an application in debug mode, but sometimes I need to quickly build (without running) a dll / exe in release mode.

Now i have to click to dropdown menu, change debug > release, wait for 5-10 seconds while Studio is loading something and only then click "Build". Then change back release > debug and wait again. This is pretty annoying.

Tell me please how to achieve one-click release builds without leaving debug mode?

Doctor Coder
  • 1,001
  • 1
  • 10
  • 17
  • You can normally change the active configuration with a combobox on the toolbar. Can't see it, the menu is covering it up. – Hans Passant Aug 27 '14 at 16:09
  • Build using command line? Take a look at `msbuild` – Nicolas R Aug 27 '14 at 16:10
  • I've tried to use command line, and it is works. But it has two disadvantages: 1. Build happens outside Visual Studio window, its output goes to console/log, it is less convinient. 2. I have to copy build .bat script for each new project manually. – Doctor Coder Aug 28 '14 at 14:48

2 Answers2

0

You can easily add a new button if you don't see one now. Here's how.
Follow these menu paths(?).

TOOLS > CUSTOMIZE >   

In the toolbar tab, create a new toolbar. Give a name you like.
Select commands tab, select toolbar option (radio) button, and select your new toolbar from the combo.
Click add command, select build from the list at left.
From the right side list, add Build solution and Solution Configurations respectively.

Enjoy. :) But not 1 click.

P.S.: You'll see your new toolbar with a build button.

Edit:
Visual Studio currently does not support macro recording. Can I record/play macros in Visual Studio 2012/2013/2015?
So either creating an add-in or using something like http://vlasovstudio.com/visual-commander/ may fix your problem. (Didn't work for me.)

Community
  • 1
  • 1
Wickramaranga
  • 943
  • 2
  • 19
  • 35
0

You can build any configuration from the Visual Studio Batch Build dialog. It is not one click, but may simplify your workflow.

Sergey Vlasov
  • 26,641
  • 3
  • 64
  • 66