in a wcf C# application, I am using:
#if DEBUG
//debug mode
#else
//release mode
#endif
to detect if I am in debug mode or release mode and have different logic for each.
But now I have created a new Configuration in the configuration manager called "Local"
how can I also create a macro similar to "DEBUG" for when I'm building in "Local" configuration. So that I can do something like
#if DEBUG
//debug mode
#elif LOCAL
//local mode
#else
//release mode
#endif
Create a "Local" configuration. Open menu "Build" and select "Configuration Manager...". Open the "Active Solution Configuration" drop down and select "New". Create a configuration named "Local" and copy settings from "Debug". Keep "Create new project configurations" on.
Change your projects to define. Select your new "Local" configuration in the drop down besides the Start button in the toolbar. Open the project configuration for each of your projects and select the category "Build". Make sure that Configuration is set to "Active (Local)" or "Local". In "Conditional compilation symbols" add "LOCAL". Repeat this for all your projects:
Use it. Add conditional compilation blocks as shown in your question.