In VS 2010, or VS 2012, you can pick a "Solution Configuration", that has been custom defined, that can define local variables used with the #if #elif #endif syntax to change your code dynamically through that drop down. Also in that configuration, you can choose whether it's built or deployed, platform you're targeting, and the local configuration you want to use per project.
When you choose a configuration, then close Visual Studio, and re-open Visual Studio, it remembers what configuration you chose, what I can't seem to figure out, is where it saves/stores that configuration information, and I need to automate it.
Does anyone know of either:
Visual Studio actually stores a solution's build configuration selections in the solution file itself. Even though the "*.suo" file is not checked into version control, the solution's build configuration selections will propagate to other machines that are sync'ed to the same version control system.
If you open a "*.sln" file, you will see a section called "GlobalSection(ProjectConfigurationPlatforms)". If a project is not checked for build or deploy, you will see something like this:
{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}.Debug|Mixed Platforms.Deploy.0 = Debug|Any CPU
The ".0" strings indicate that the the build and deploy are unchecked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With