Is there any way to make Release and Debug both build?

2019 update

In Visual Studio 2015 there actually is an option to build multiple configurations together.

You can find this option under Menu > Build > Batch Build.., this will open the following window which I think is pretty self explanatory.

Batch build screenshot VS2015

Of course if you are use to doing it with keyboard shortcuts just use: alt + B > T > Enter, and all the selected projects will build.


There is no way to instruct VS to build more than one configuration upon build. From VS point of view the build command builds a particular project or solution of projects using a single configuration (debug and release are simply two possible configurations).

You can however use a post build command to do just about anything (including trigger the build of another configuration). However just because you can do anything post-build doesn't mean it is a best practice or even a good idea.

Before you go down that road you may want to consider if this is an xy problem. The "y" question is really "How can I have a release copy of my current codebase even if it isn't ready for release, and constantly update the last stable release with the most current codebase which happens to compile?"

Is there really a need to push production release the most recently compiled codebase (regardless of its quality) that will replace the last stable release within seconds without needing to press a single button AND while in the middle of a debug session? I would gather most experienced developers would say "no" and most team leads would say "oh hell no". It is the stuff of nightmares for project managers.

You may want to look into setting up a continual integration build server. I am taking a stab in the dark here but I am thinking it accomplishes what you need (although not what you asked).

In the past setting up a CI server had a lot of overhead for a small project so it usually didn't get done. Here is a guide on setting up CI using Visual Studio Online and Azure