Question About Config Manager

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm relatively new to C# .Net (just as a warning ;-)).

I'm wanting to do two different builds of my .Net app, one for the full
retail the other for a simple trial that has a few nag screens and some
limitations on features.

I've set it up in my configuration manager in VS2003 to have one release
build and one "trialversion" build.

My question is how can I tell the difference in my code and have the
compiler not include pieces of code if it is being built with the
"trialversion" configuration?

I was able to do this relatively simplt in VC++ with the #ifdef's and the
like. Is there anything like that with C# .Net?

thanks in advance,
ed
 
You can use the following syntax
#if _TRIALVERSION_

Condiional Code
#endif

You can define the Conditional Compilation Constraints under the Project ->
Properties -> COnfiguration Properties -> Build

Hope this helps

--
- Shuvro
SDE, MSFT

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
 
I had a feeling it would be something that simple. I just wasn't looking in
the right places I guess.

Thanks, Shuvro.

Ed
 
Back
Top