views:

102

answers:

2

We have an ASP.Net solution that is split up in to several projects (some are class libraries and some are actual Asp.Net sites).

One thing that has always bothered me is if the ASP.Net sites and class library dlls are built in debug mode, and are then published, web config changed so that "debug=false" will the class library dlls be built in release mode?

If I don't get an answer then I'll experiment my self and report back.

Cheers Tony

+1  A: 

The Class Libraries will still be deployed as debug builds, with the potential performance implications that you would expect.

The Web site depends on the type of the project - if it's a Web Site project (i.e. you deploy .as?x and .cs files to the server, and they are compiled at runtime) then yes, this will have an effect on the build of these elements.

If it's a Web Application Project (i.e. you build it, and deploy the .dll to /bin folder or GAC of the server) then no, this will have no effect on the compilation mode - as with the class libraries.

But it will change how the pages are processed before they are sent to the users.

Scott Guthrie had a good post on some of this:

Don't run production ASP.NET Application with debug="true" enabled

Tess Ferrandez also has a good post on this topic:

ASP.NET Memory: If your application is in production… then why is debug=true

Zhaph - Ben Duguid
Just what I was looking for, nice one Zhaph
TWith2Sugars
A: 

The web.config setting <compilation debug=”false” /> (or true) has to do with whether debug symbols are injected into the runtime-compiled “page” assemblies. I believe it also affects caching of web resources served up via WebResource.axd.

This setting has nothing to do with whether the application was initially compiled as a “Release” or “Debug” build.

Craig