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.
You can use the MSBuild Community Tasks and do:
Or you can use various built-in Visual Studio transformation techniques:
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)