Re: VS2005 conditional directive
- From: "Hardy Wang" <hardywang@xxxxxxxxxxxxxxxxx>
- Date: Wed, 13 Sep 2006 15:39:20 -0400
Hi Kevin,
I finally have the chance to try today. I have a web page with following
code:
protected void Page_Load(object sender, System.EventArgs e) {
#if DEBUG
Response.Write("Debug");
#else
Response.Write("Release");
#endif
}
I switched project to release mode, and compiled with web deployment
project, and copied all files to server. I opened web.config of this project
on server, and noticed :
<compilation debug="false" defaultLanguage="c#">
When I run the project, I still see "Debug" displayed.
--
WWW: http://www.imagestation.com/members/hardywang
ICQ: 3359839
yours Hardy
"Kevin Yu [MSFT]" <v-kevy@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:FlkwCnX0GHA.4280@xxxxxxxxxxxxxxxxxxxxxxxx
Hi Hardy,
Based on my research, VS2005 still supports the conditional directive. You
can switch the DEBUG and RELEASE mode in web.config file. An element named
<compilation debug="false"/>. If you use true, it is debug mode, while if
you use false, it's release mode.
When I tried it on my machine, it works fine.
Kevin Yu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
.
- Follow-Ups:
- Re: VS2005 conditional directive
- From: Kevin Yu [MSFT]
- Re: VS2005 conditional directive
- References:
- VS2005 conditional directive
- From: Hardy Wang
- RE: VS2005 conditional directive
- From: Kevin Yu [MSFT]
- VS2005 conditional directive
- Prev by Date: SQLExpress database file auto-creation error when using Visual Stu
- Next by Date: Re: Microsoft Visual J# Distributable Package?
- Previous by thread: RE: VS2005 conditional directive
- Next by thread: Re: VS2005 conditional directive
- Index(es):
Relevant Pages
|