Debug in web.config

M

muriwai

Hi,

I have <compilation debug="true"> in my web.config. The trouble is that I
have to manually change this to "false" every time I publish the website. I
tried moving this to global machine.config and web.config on the development
machine, but then VS 2005 complains that there's no Debug in web.config and
asks to modify the file. When I remove the compilation section completely
from local web.config, VS 2005 adds a new one. This is a big annoyance for
me, or am I missing something?

Thanks

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config
<configuration>
<system.web>
<compilation debug="true" />

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\web.config
<configuration>
<system.web>
<compilation debug="true">
...



--
 
W

Walter Wang [MSFT]

Hi muriwai,

I believe following article can help answer your question:

#K. Scott Allen : Debug and Release Builds in ASP.NET 2.0
http://odetocode.com/Blogs/scott/archive/2005/11/15/2464.aspx
<quote>
Note: the Publish command does not change the debug setting in web.config.
The Publish command always compiles for "release", however, if you
precompile to an updateable web site, and then update the web site in place
(which results in dynamic compilations), those dynamic compilations will
produce debug code and pdb files.

...

Unlike the Publish command, a WSD Release build will change the debug
setting of web.config to false. The WSD also defaults to placing release
builds in a Release directory and debug builds in a Debug directory, which
is familiar to anyone using .NET outside of web forms. WSD is an awesome
tool and I'm sure will be covered in more detail here (eventually).
</quote>



Hope this helps.


Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top