I have a C++ project that builds as an EXE. However I also need to build the project as a static library (.LIB file). Right now in order to get a complete build, I need to build it in one format, then open the project properties and under General > Project Defaults > Configuration Type select the other format, accept, and recompile. It's a real hassle. Is there some way of specifying both types? I haven't seen anything on MSDN on this.
I'm using Visual Studio 2012.
A common (and particularly sane) way to solve your problem is to have a solution containing two projects. The first project should be a library (statically or dynamically linked, it doesn't matter) that contains most of your code. The second project should be an executable that references the library you've created in your first project.
Do it this way and a single build of your solution will produce both the executable and the library.