Asp – Visual Studio 2008 – Conditional Compilation Symbol for Solution, not Project

asp.netvisual studiovisual-studio-2008

I want to use a compilation symbol, like DEBUG, except a different name, and have it associated with a solution, not a project, so that it applies to all the solution's projects.

Rather than define the same symbol in multiple projects, is there a way to define a symbol once, that applies solution-wide, via VS2008?

Best Answer

You can define own Build configurations with the Visual Studio Configuration Manager and define the symbol in the project build configuration. It's easy and also works for C# (see my comment on Simon Wilson's answer). To do so, just click on in the Solution Configuration Manager and check "Create new project configurations". Then you can define the symbols in each project for the new build configuration.