Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Help with Conditional Compiling

Posted on 2009-04-15
3
380 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

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…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

856 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