I've been trying to implement some performance tuning recently and somewhat confused on what the actually setting should be for the Solution/Projects.
I've always understood that one should change the web.config file setting from debug="true" to debug="false" when publishing out for a live enviornment (which I think everyone would agree). What I notice (and others I'm sure too) is that the .pdb files
seem to still get generated as if that web setting to false didn't really do anything. Is this the case??
Next, I start roaming the web and trying to read anything in my books on it (which hardly any of my books as info on this topic) I've come across the Project Properties of my application and see that there is a Configuration setting option (Active(Debug),
Debug, Release, All Configurations). Now I've never changed this setting EVER, but when I do and set it to "Release" and then publish it actually changes the "Publish Build Configuration" in the Publish Web window to "Release", unlike when I simply changed
debug = "false" in the web.config file. This appears to be what I should have been doing for years (and never did), but then I read people saying to just change it in the web.config and not change the configuration setting of the project(s)/solution??? I'm
confused with this....Should we not be changing this setting???
Also, it wasn't simply a change to my project configuration. I had to change the setting to "Release" in my Solution (and every project Configuration within my solution), and the main project to get the publish window to show a build of Release and not
Debug which seems excessive to get this accomplished.
Lastly, after doing this (changing everything I could find to Release and publishing) and then reverting all my settings back to Active(Debug), I noticed that my local copy of the application about TRIPPLED in size to over 1GB from around 380MB!!! Not sure
what happened here, why, or how to fix it.
Can anyone enlighten me here on these settings, the "proper" way things should be published out for a live enviornment, why I now have a super-sized happy meal of an application (that's a drag to load up).
when we biuld/publish in release mode the size will be very much lesser of the assemblies then pdb will also be light weight.
the reason why this is generated is if we logging information on some exception then we will get complete details of method and .cs file whilch will be helpful in fixation.
deploy without pdb file will also work fine
if we dont want this file to be generated then right click on project goto properties to go Package/Publish Web and check "Exclude generated debug symbols"
Thanks for the response Mudasir. So simply checking "Exclude generated debug symbols" will make it so the .pdb's are not generated is nice to know. I guess I could always simply "delete" the .pdb's from the destination location as well.
So should one "always" be setting the configuration to "Release" as it greatly reduces sizing for a live enviornment??
Why does setting the web.config file to debug= "false", apparently not do anything as the "Publish Web" window still shows a publish build configuration of "Debug"??
Do I have to change the configuration setting on each of my projects build to "Release"?
trag1
Member
22 Points
65 Posts
Publish Settings Configuration (Debug / Release)
May 22, 2012 04:48 PM|LINK
I've been trying to implement some performance tuning recently and somewhat confused on what the actually setting should be for the Solution/Projects.
I've always understood that one should change the web.config file setting from debug="true" to debug="false" when publishing out for a live enviornment (which I think everyone would agree). What I notice (and others I'm sure too) is that the .pdb files seem to still get generated as if that web setting to false didn't really do anything. Is this the case??
Next, I start roaming the web and trying to read anything in my books on it (which hardly any of my books as info on this topic) I've come across the Project Properties of my application and see that there is a Configuration setting option (Active(Debug), Debug, Release, All Configurations). Now I've never changed this setting EVER, but when I do and set it to "Release" and then publish it actually changes the "Publish Build Configuration" in the Publish Web window to "Release", unlike when I simply changed debug = "false" in the web.config file. This appears to be what I should have been doing for years (and never did), but then I read people saying to just change it in the web.config and not change the configuration setting of the project(s)/solution??? I'm confused with this....Should we not be changing this setting???
Also, it wasn't simply a change to my project configuration. I had to change the setting to "Release" in my Solution (and every project Configuration within my solution), and the main project to get the publish window to show a build of Release and not Debug which seems excessive to get this accomplished.
Lastly, after doing this (changing everything I could find to Release and publishing) and then reverting all my settings back to Active(Debug), I noticed that my local copy of the application about TRIPPLED in size to over 1GB from around 380MB!!! Not sure what happened here, why, or how to fix it.
Can anyone enlighten me here on these settings, the "proper" way things should be published out for a live enviornment, why I now have a super-sized happy meal of an application (that's a drag to load up).
Thanks
Mudasir.Khan
All-Star
15346 Points
3142 Posts
Re: Publish Settings Configuration (Debug / Release)
May 22, 2012 05:14 PM|LINK
when we biuld/publish in release mode the size will be very much lesser of the assemblies then pdb will also be light weight.
the reason why this is generated is if we logging information on some exception then we will get complete details of method and .cs file whilch will be helpful in fixation.
deploy without pdb file will also work fine
if we dont want this file to be generated then right click on project goto properties to go Package/Publish Web and check "Exclude generated debug symbols"
trag1
Member
22 Points
65 Posts
Re: Publish Settings Configuration (Debug / Release)
May 22, 2012 05:32 PM|LINK
Thanks for the response Mudasir. So simply checking "Exclude generated debug symbols" will make it so the .pdb's are not generated is nice to know. I guess I could always simply "delete" the .pdb's from the destination location as well.
So should one "always" be setting the configuration to "Release" as it greatly reduces sizing for a live enviornment??
Why does setting the web.config file to debug= "false", apparently not do anything as the "Publish Web" window still shows a publish build configuration of "Debug"??
Do I have to change the configuration setting on each of my projects build to "Release"?