Hi Peter,
Thanks for your reply.
To rephrase:
What I was doing under VS2003 was declare a set of Custom constants in the
'Project' - 'Configuration Properties' - 'Build' page.
eg. I have one class that is shared between two projects. One project is a
service, the other is an app. By having a "Service = False" entry in the
app project and a "Service = True" entry in the Service project I could
block out the appropriate bits in each project automatically.
Now I understand that I can do the same thing in VS2005.
My 'complaint' is that you no longer can turn the constant off. ie
"Service= False" is not allowed. You must omit it from the list.
Once you have 5 or 6 constants it becomes a nightmare trying to remember
which ones to declare for which functionality. ( The above example is static
so not really a problem but I use the same technique inside a project to
produce the various flavours.
This led me to think that maybe there is another 'proper' way to control
compilation that I am missing.
regards
Bob
"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.com> wrote in message
news:0A**********************************@microsof t.com...
Bob,
I am not sure that your post is specific enough to get an answer that will
be valuable to you.
Usually, conditional compilation directives (for a very simple example,
#If(DEBUG) )
are used to "block out" sections of code that will either get compiled
into the assembly or ignored (or in the case of specific constants, "included"
in the compilation).
Does this help?
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"Bob" wrote:
Hi,
In VS2003 conditional compilation constants and their state could be
defined at project level.
I was using this to control what features where offered by various
builds. i.e. Feature1=true,Feature2=false, ...
VS2005 seems to either allow the existance of the constant or not.
ie. You must omit a constant not declare it to be false
This means that the list no longer declares the state of all the
options. So...
I think that perhaps I am not using the right tool for the job.
What is the 'correct' way to control conditional compilation at project
level?
Thanks
Bob