Solved

Help with Conditional Compiling

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
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…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

773 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