Solved

Help with Conditional Compiling

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Class object 2 27
C# Offline Apllication 5 55
Device Location 4 13
C#.NET and microsoft certification. 3 34
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

895 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

17 Experts available now in Live!

Get 1:1 Help Now