I use VS 2008 to develop and I use CCNet to build, test and deploy our applications to a staging server. I would like to be able to remove the debug="true"
setting from web.config as part of the deployment process.
I know I could just set <deployment retail="true"/>
in machine.config, but I don't always have that much access the servers we deploy to. I could just write a bit of code to strip the setting from the web.config, but I was wondering if there was a way I could do it out of the box with msbuild or CCNet.
debug=true is for debugging during development. It creates debugging symbols used to provide metadata about the current executing code. debug=false is is for deployment to a production server.
USB Debugging mode is a developer mode in Samsung Android phones that allows newly programmed apps to be copied via USB to the device for testing. Depending on the OS version and installed utilities, the mode must be turned on to let developers read internal logs.
You can use the MSBuild Community Tasks and do:
<XmlUpdate
XmlFileName="web.config"
XPath="//configuration/system.web/compilation/@debug"
Value="false"/>
Or you can use various built-in Visual Studio transformation techniques:
<configuration xmlns:xdt="...">
<compilation xdt:Transform="RemoveAttributes(debug,batch)">
</compilation>
</configuration>
NB this is a duplicate of Setting debug=false in web.config as part of build (Which I found too late; have put a vote to close on this)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With