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

One option you could use is to create a . Cs file in 1 location with #define MYSYMBOL in it and add the file to each project in your solution using the Add as link option. This would allow you to have a single point of symbol/shared information definition.

This does not work in C#, because (from MSDN): The symbol remains defined until an #undef directive for that same symbol is processed, or until the end of the source file is reached. An implication of this is that #define and #undef directives in one source file have no effect on other source files in the same program. – Rene Schulte Apr 16 '10 at 10:29.

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.

Cs file in 1 location with #define MYSYMBOL in it and add the file to each project in your solution using the Add as link option. This would allow you to have a single point of symbol/shared information definition.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions