Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2008 - Conditional Compilation Symbol for Solution, not Project

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?

like image 952
Steve Avatar asked Sep 17 '09 19:09

Steve


1 Answers

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.

like image 170
Rene Schulte Avatar answered Nov 15 '22 19:11

Rene Schulte