I have 2 build-specific configuration code blocks. The first one should be applied when the app is launched locally and the second one when I publish the site to the web. Now I comment/uncomment one of them when I need to publish. So I wonder is there any way to do something like this:
#if PUBLISH
anyConfig = "publish_config";
#else
anyConfig = "debug_config";
#endif
Thanks in advance!
Select the RELEASE configuration then go to the properties page of your project and add the PUBLISH define in the Build page into the Conditional Symbol textbox.
When you are ready to deploy your app, switch again in RELEASE configuration and build your app.
You could also create a custom configuration.
(DEBUG if this new configuration will be used during debug sessions)
Now you could select this new configuration as you do for DEBUG or RELEASE and add to this configuration your unique symbols.
(I use this method for a WinForm application where some features are available only for RELEASE_PRO configuration)