470,820 Members | 1,901 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,820 developers. It's quick & easy.

Conditional compilation in C# - Help

I created two projects, one web and one windows app.
The Conditional code works ONLY for the windows app:
#if (DEBUG)
MessageBox.Show ("In Debug");
#else
MessageBox.Show("Not Debug");
#endif

but NOT for the web:
===
#if (DEBUG)
Response.Write("In Debug");
#else
Response.Write("Not Debug");
#endif

What the heck is going on ?!

Jun 26 '06 #1
1 1196
Hello, Yoni!

Y> but NOT for the web:
Y> ===
Y> #if (DEBUG)
Y> Response.Write("In Debug");
Y> #else
Y> Response.Write("Not Debug");
Y> #endif

The problem here is that DEBUG symbol is not defined ( via /define DEBUG )

I've checked my ( VS2005 ) web project settings and didn't find a way how can a add compiler options
:8-(

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Jun 26 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Steven T. Hatton | last post: by
1 post views Thread by chris han | last post: by
12 posts views Thread by wanghz | last post: by
2 posts views Thread by FireStarter | last post: by
4 posts views Thread by Bob | last post: by
10 posts views Thread by Dave | last post: by
1 post views Thread by Marek | last post: by
6 posts views Thread by maxwell | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.