Link to home
Start Free TrialLog in
Avatar of Mohit Vijay
Mohit VijayFlag for India

asked on

ASP.NET dll compilation in debug or Release Mode

Hello,

As I know there is two way in ASP.NET for dll deployment of production servers:

1. Compile  the code in Release Mode, in this way, dll will be lighter, without debug symbol, and this way code execution will be much faster.
2. compile the code as normal, in debug mode. and set the web.config node "debug Mode=false".

My Questions is:
What is difference between Compiling the code in *only* Release Mode or *only* setting the web.config node.

Please suggest.
Avatar of Amandeep Singh Bhullar
Amandeep Singh Bhullar
Flag of India image

Avatar of Mohit Vijay

ASKER

Its ok,what about compiling the code in debug mode and setting compilation debug="false" in web.config?
you cannot do that.
Debugging will not will available if debug is set to false in config file
I know debugging will not be available. But what about the performance, if we put debug mode compiled dll and set web config compilation debug mode="false".
you can do that, But performance will not be as good as DLL's of release mode
ASKER CERTIFIED SOLUTION
Avatar of Rakesh Jaimini
Rakesh Jaimini
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Its Ok.

But Please consider a special case:

we have a dll compiled in debug mode, going to deploy it on production with setting debug="false" on server.

Is it acceptable or not? what will be impact on performance.

How can I get exact Error line number, when any error occur in ASP.NET code?

Remember: I have release mode compiled dll and in web.config, debug mode is set to false.
if you put try catch, it will catch the exception and will also display the line number.
Only difference is that, dubugger will not be called.
whatever I got the answer, it was the best from all of them.