问题
When I select Build->Build or anything else it only build the currently selected configuration (Debug or Release). How to make it build for example Release also when I'm in "Debug mode" (I have debug selected)?
回答1:
You can do this with "Batch Build", although it's not available in the Express version. Anyway, you don't want to be building from the GUI anyway, you should be using msbuild or something of that nature to automate your build process.
回答2:
If you want to use the build button and not build it via menus, you can use the Post-build Command function (or pre-build - it is up to you).
You can parametrized the commands using project properties via macros. It can be useful for auto-copying of final assemblies to central location, etc.
回答3:
In Visual Studio GUI, go to the menu
Build --> Batch Build
This will pop up a window with all the possible combinations of projects and their configurations. Select all the items you want to build together and click Build button on the right side of the window.
That's it.
There is also a button to Rebuild group of configurations instead of Build (which is an incremental build).
There is also an option to select/deselect all configurations/projects to Build/Rebuild.
回答4:
In order to build for Release mode, the shortcut is Ctrl + F5, but I don't think you can build both at the same time... I don't understand why you would need to.
来源:https://stackoverflow.com/questions/4980429/how-to-build-debug-and-release-at-once