Solved

Help with Conditional Compiling

Posted on 2009-04-15
3
381 Views
Last Modified: 2012-05-06
I have inherited some code from someone else and it uses #if, #else and #endif structures for conditional compiling.  For example, in the AssemblyInfo there is the attached code.  My problem is that I cannot find a reference to the keyword TRIAL anywhere.  How do I tell the IDE that I want to compile the TRIAL version.

Thanks


#if TRIAL
[assembly: AssemblyTitle("Product Name v1.0 - Trial")]
#else
[assembly: AssemblyTitle("Product Name v1.0")]
#endif

Open in new window

0
Comment
Question by:nicksbell
3 Comments
 
LVL 19

Accepted Solution

by:
alb66 earned 250 total points
ID: 24145855
From Project|Properties (look at constant.jpg)

See also "A guide to conditional compilation" at
http://www.builderau.com.au/program/dotnet/soa/A-guide-to-conditional-compilation/0,339028399,339243600,00.htm

constant.JPG
0
 
LVL 12

Assisted Solution

by:andrewjb
andrewjb earned 250 total points
ID: 24145872
Project properties / Build / General : "Conditional compilation symbols"
0
 
LVL 2

Author Closing Comment

by:nicksbell
ID: 31570321
Strictly speaking andrewjb had the correct answer because I am using VS2008 but I didn't specify that so alb66 is correct too for previous versions.  Hope you don't mind if I split the points.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question