473,480 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Debug vs. Release Executable size

I am developing an application using Windows forms, C# and Visual
Studio.Net. The executable size remains the same whether I built the debug
or release version. Is it normal? Am I missing something? Thanks for ur
help.

PR
Jul 21 '05 #1
8 2298
The physical size of the assembly will not always change when in release
mode, yet you may still get a better performing assembly.

Please do not cross-post your questions.
"Pocket Rocket" <po***********@hotmail.com> wrote in message
news:u3**************@TK2MSFTNGP12.phx.gbl...
I am developing an application using Windows forms, C# and Visual
Studio.Net. The executable size remains the same whether I built the debug or release version. Is it normal? Am I missing something? Thanks for ur
help.

PR

Jul 21 '05 #2
> > I am developing an application using Windows forms, C# and Visual
Studio.Net. The executable size remains the same whether I built the

debug
or release version. Is it normal? Am I missing something? Thanks for ur help.


I believe the debug information is located in the pdb file and only a little
amount of infomation about debuging is in the actual assembly..Correct me if
im wrong.

Regards Anders
Jul 21 '05 #3
You are correct. When you compile in release mode the .pdb file does not
get created.
"Flare" <no****@sorry.dk> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
I am developing an application using Windows forms, C# and Visual
Studio.Net. The executable size remains the same whether I built the debug
or release version. Is it normal? Am I missing something? Thanks
for ur help.

I believe the debug information is located in the pdb file and only a

little amount of infomation about debuging is in the actual assembly..Correct me if im wrong.

Regards Anders

Jul 21 '05 #4
So, do I need the pdb file if I want to know the file+line where the
program crashes on a computer without VS installed?
-Gernot
Jul 21 '05 #5
I can't say (I do have VS.NET and don't use the .pdb file myself).
"Gernot Frisch" <Me@Privacy.net> wrote in message
news:c0*************@ID-37212.news.uni-berlin.de...
So, do I need the pdb file if I want to know the file+line where the
program crashes on a computer without VS installed?
-Gernot

Jul 21 '05 #6
> So, do I need the pdb file if I want to know the file+line where the
program crashes on a computer without VS installed?
absolutely.
but your release product should not be in debug mode for performance and
possibly security resasons. the exception is when you have a special problem
you can send a debug version to the customer to enable you to better
troubleshoot the problem.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Gernot Frisch" <Me@Privacy.net> wrote in message
news:c0*************@ID-37212.news.uni-berlin.de... So, do I need the pdb file if I want to know the file+line where the
program crashes on a computer without VS installed?
-Gernot

Jul 21 '05 #7
Pocket Rocket wrote:
I am developing an application using Windows forms, C# and Visual
Studio.Net. The executable size remains the same whether I built the
debug or release version. Is it normal? Am I missing something?


In addition to what has already been posted on this subject bear in mind
that the compiler will add the [Debuggable] attribute to a debug build to
turn off JIT optimization and to tell the .NET runtime to track how objects
are used (and make this information available to the debugger). Thus, it is
not a good idea to use debug build assemblies in a production environment
because their performance will be impaired.

Richard
--
my email ev******@zicf.bet is encrypted with ROT13 (www.rot13.org)
sign up for my free .NET newsletter at
http://www.wd-mag.com/newsletters/
Jul 21 '05 #8
Release code should be built with /debug:pdbonly. This way you get
both optimizations and symbols.

I'm not sure if VS project editor allows you to set this option though.

"Alvin Bruney [MVP]" wrote:
So, do I need the pdb file if I want to know the file+line where the
program crashes on a computer without VS installed?
absolutely.
but your release product should not be in debug mode for performance and
possibly security resasons. the exception is when you have a special

problem you can send a debug version to the customer to enable you to better
troubleshoot the problem.

Jul 21 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
5127
by: Bhavna Rohra | last post by:
Hello everyone, Sorry, it might sound easy for everyone but please if someone colud tell me how to debug my MFC application in Release mode. Thanks
3
1391
by: AKA COOPERMAN | last post by:
As C# express only creates RELEASE builds, how do I get my Debug.WriteLine statements to work ?
7
2880
by: Srinivasa Rao | last post by:
I have read in one article that when we compile the application in release mode, all the debug classes and properties will be automatically removed from the code. I tried to implement this thing by...
3
2171
by: | last post by:
Since I need to dotfuscate my exe file anyway, does it make any difference if I use Debug or Release versions. Would a Debug version be easier to decompile/study/reverse engineer than a Release...
8
324
by: Pocket Rocket | last post by:
I am developing an application using Windows forms, C# and Visual Studio.Net. The executable size remains the same whether I built the debug or release version. Is it normal? Am I missing...
7
3992
by: MB | last post by:
I had a C++ dll that I used for C++ applications. I added a managed C++ class to this library and started to use the managed C++ class in my C# application. This works OK only if I build the C++...
5
3382
by: Jonas Hallgren | last post by:
Hello, Is there any general tips on how to solve this problem: my Debug version runs fine but when I do a Release version I get error messages!? I'm hoping it is a simple option somewhere or...
5
1772
by: Anil Gupte | last post by:
Is there any way to define a variable that recognizes Debug versus Release versions? Basically, in the two versions, I want to use different directiories for certain tasks. For example If...
2
2679
by: Dave Johansen | last post by:
I just converted a solution from Visual Studio 2003 to Visual Studio 2005 and the Debug mode seems to be running just fine, but the Release mode crashes on the following code: std::ifstream...
0
7054
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7102
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6756
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7003
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5357
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4798
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3000
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
570
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
199
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.