Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / March 2006

Tip: Looking for answers? Try searching our database.

Configuration dependent resource?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Juan Dent - 09 Mar 2006 20:33 GMT
Hi,

I need to have a string's value depend on the configuration of the assembly.
Is this possible?

Any ideas?
Signature

Thanks in advance,

Juan Dent, M.Sc.

"Gary Chang[MSFT]" - 10 Mar 2006 08:27 GMT
Hi Juan,

>I need to have a string's value depend on the  
>configuration of the assembly.
>Is this possible?

I suggest you use the #if/#endif preprocessor directive to workaround this
requirement.

You can define the specified Conditional Compilation Constants(VS2003 IDE:
Project Property Pages/Configuration Properties/Build/Code Generation) for
each of your configuration. By default, the DEBUG is defined in the
project's Debug configuration:

#if DEBUG
 string str = "DebugConfiguration";
#endif

#if Config1 ///define this compilation constant in the corresponding
project configuration's Conditional Compilation constants entry
 string str = "Configuration1";
#endif

Please refer to the following MSDN documentation for the further
information:

2.5.4 Conditional compilation directives
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csspec/html
/vclrfcsharpspec_2_5_4.asp

Thanks!

Best regards,

Gary Chang
Microsoft Community Support
======================================================
PLEASE NOTE the newsgroup SECURE CODE and PASSWORD will be updated at 9:00
AM PST, February 14, 2006.  Please complete a re-registration process by
entering the secure code mmpng06 when prompted. Once you have entered the
secure code mmpng06, you will be able to update your profile and access the
partner newsgroups.
======================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from this issue.
======================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.