Solved

Help with Conditional Compiling

Posted on 2009-04-15
3
372 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now