473,902 Members | 4,620 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ILMerge...Why?

I have read several threads regarding using ILMerge to combine all your
dlls with your exe to create one single exe file....I don't get it.

Why would you ever want to do this?

Todd
Jul 20 '08
28 3913
J.B. Moreno wrote:
You don't need DLL's to unload the code out of memory, and hard disk
space hasn't been an issue for anybody (including MS) since gigabyte
hard drives came out.
I do see your point about the disk space, but just because you have
gigabytes of space available, doesn't mean you should use gigabytes of
space. :)

Also, although I can already hear the objections that will be raised on
this point, size DOES matter to those who want to download a program,
but are not fortunate enough to have access to super-fast internet
connections. Believe it or not there are still plenty of people out
there who are forced to either use a dial-up connection or not have
internet at all....

I know this because until recently I was one of those people who still
only had a 28k (not even 56k) dial-up connection because that was all
that was available where I lived. (LOL... Thank goodness, I moved.)

[snip]
Code reuse is a different matter, and in a way it's the saving grace of
DLLs. They limped along for a decade looking for a problem to solve,
one eventually came along -- the internet and interactive web page.

But unless you're working on a program that is going to have a web
based front end, or needs some other kind of distributed execution,
dlls just aren't of much benefit.
I don't work on programs with web-based front-ends, but I still use dlls
for code reuse. Why would I want to write the same code over and over
again when I can just write it once, store it in a dll and then use it
with as many programs as I want?

Todd

P.S. Thanks to everyone participating in this thread. I'm learning a
lot. (even if it might not seem like it at times <grin>)
Jul 22 '08 #11
Arne Vajhøj wrote:
Todd Carnes wrote:
>I have read several threads regarding using ILMerge to combine all
your dlls with your exe to create one single exe file....I don't get it.

Why would you ever want to do this?

In most cases it is a bad idea, because you get multiple copies
of the code in DLL's which is against the fundamental idea of DLL's.

But it makes deployment slightly easier and in some cases that can
justify it.
May I ask you for an example when it would be justified?

Todd

Jul 22 '08 #12
Todd Carnes <to********@gma il.comwrote:
J.B. Moreno wrote:
You don't need DLL's to unload the code out of memory, and hard disk
space hasn't been an issue for anybody (including MS) since gigabyte
hard drives came out.

I do see your point about the disk space, but just because you have
gigabytes of space available, doesn't mean you should use gigabytes of
space. :)
No, of course not...but are you building an application that requires
gigabytes of space?
Also, although I can already hear the objections that will be raised on
this point, size DOES matter to those who want to download a program,
but are not fortunate enough to have access to super-fast internet
connections. Believe it or not there are still plenty of people out
there who are forced to either use a dial-up connection or not have
internet at all....

I know this because until recently I was one of those people who still
only had a 28k (not even 56k) dial-up connection because that was all
that was available where I lived. (LOL... Thank goodness, I moved.)
Well, until fairly recently I didn't even see 28k (19-24 was the norm),
so I do understand....b ut in most cases DLL's won't make a difference.

2 out of 3 things have to be true for DLL'S to matter in regards to
size, 1 I'll take as a given (lack of access to a decent patcher
program), but the other two....

2. Frequent updates to PART of the program
3. Multiple programs installed on the users computer that share a
large amount of code.

DLL's don't help with the initial download, only subsequent downloads
and d
[snip]
Code reuse is a different matter, and in a way it's the saving grace of
DLLs. They limped along for a decade looking for a problem to solve,
one eventually came along -- the internet and interactive web page.

But unless you're working on a program that is going to have a web
based front end, or needs some other kind of distributed execution,
dlls just aren't of much benefit.

I don't work on programs with web-based front-ends, but I still use dlls
for code reuse. Why would I want to write the same code over and over
again when I can just write it once, store it in a dll and then use it
with as many programs as I want?
You can statically link against the same code -- dynamic linking is
useful when the code you're "reusing" changes faster than the code
using it (this is the case for plug-in's for instance), or is outside
your control.

Don't get me wrong, I'm not saying that they are never appropriate and
wouldn't necessarily recommend using ILMerge. But I would recommend
taking a look at your proposed usage before breaking things out into
separate DLL's.

--
J.B. Moreno
Jul 22 '08 #13
J.B. Moreno wrote:
Todd Carnes <to********@gma il.comwrote:
>J.B. Moreno wrote:
>>You don't need DLL's to unload the code out of memory, and hard disk
space hasn't been an issue for anybody (including MS) since gigabyte
hard drives came out.
I do see your point about the disk space, but just because you have
gigabytes of space available, doesn't mean you should use gigabytes of
space. :)

No, of course not...but are you building an application that requires
gigabytes of space?
LOL, no, of course I'm not. I was exaggerating a bit to make a point. :)
>Also, although I can already hear the objections that will be raised on
this point, size DOES matter to those who want to download a program,
but are not fortunate enough to have access to super-fast internet
connections. Believe it or not there are still plenty of people out
there who are forced to either use a dial-up connection or not have
internet at all....

I know this because until recently I was one of those people who still
only had a 28k (not even 56k) dial-up connection because that was all
that was available where I lived. (LOL... Thank goodness, I moved.)

Well, until fairly recently I didn't even see 28k (19-24 was the norm),
so I do understand....b ut in most cases DLL's won't make a difference.

2 out of 3 things have to be true for DLL'S to matter in regards to
size, 1 I'll take as a given (lack of access to a decent patcher
program), but the other two....

2. Frequent updates to PART of the program
3. Multiple programs installed on the users computer that share a
large amount of code.

DLL's don't help with the initial download, only subsequent downloads
and d
You know, I hadn't looked at it in that way before. you make a good point.

Thanks for taking the time to respond. :)

Todd

Jul 22 '08 #14
Todd Carnes wrote:
I thought the whole idea of dll's, as well as so's on Linux systems, was
that they could be unloaded from memory when not in use and that more
than one program can use them, thus saving disk space and saving time &
money (because you don't have to re-invent the wheel every time you
write a new program). Surely, once you've used ILMerge to squash
everything into one file this is no longer true, correct?
A couple of things. One, only AppDomains can be unloaded. Therefore,
statically linked assemblies can not be unloaded.
Two, there is an overhead for loading assemblies. Perhaps nothing
noticeable for a handful of assemblies, but if you're breaking
everything out in 10's or 100's of assemblies, your load time of the
application will increase significantly. By ILMerge'ing them into a
single EXE you can reduce this overhead.

--
Joel Lucsy
"The dinosaurs became extinct because they didn't have a space program."
-- Larry Niven
Jul 23 '08 #15
Todd Carnes wrote:
Arne Vajhøj wrote:
>Todd Carnes wrote:
>>I have read several threads regarding using ILMerge to combine all
your dlls with your exe to create one single exe file....I don't get it.

Why would you ever want to do this?

In most cases it is a bad idea, because you get multiple copies
of the code in DLL's which is against the fundamental idea of DLL's.

But it makes deployment slightly easier and in some cases that can
justify it.

May I ask you for an example when it would be justified?
The obvious one is if for whatever reasons requirements:
- must be distributable as a single file
- must run as is without any installation
- must be a windows app not a web app
have been cast in stone.

Arne
Jul 28 '08 #16
J.B. Moreno wrote:
Code reuse is a different matter, and in a way it's the saving grace of
DLLs. They limped along for a decade looking for a problem to solve,
one eventually came along -- the internet and interactive web page.

But unless you're working on a program that is going to have a web
based front end, or needs some other kind of distributed execution,
dlls just aren't of much benefit.
What ??

Modularization of the deployment model is essential for
a decent development process.

Building everything to a big EXE does not work at all
for large projects.

I would be skeptical about it working even for medium
size projects.

Arne
Jul 28 '08 #17
Arne Vajhj <ar**@vajhoej.d kwrote:
J.B. Moreno wrote:
Code reuse is a different matter, and in a way it's the saving grace of
DLLs. They limped along for a decade looking for a problem to solve,
one eventually came along -- the internet and interactive web page.

But unless you're working on a program that is going to have a web
based front end, or needs some other kind of distributed execution,
dlls just aren't of much benefit.

What ??

Modularization of the deployment model is essential for
a decent development process.
Deployment is part of the development process, but in most cases it
shouldn't be driving it. If it is, then you probably have some kind of
distributed execution system, and not a single application.

Building everything to a big EXE does not work at all
for large projects.
How does it not work? And how about putting some numbers to "large"
and "medium"?
I would be skeptical about it working even for medium
size projects.
It sounds like you're talking systems, in which case yeah sure, you
don't want to take down part of the system because you're updating
another. But that's covered under distributed execution -- one
user/one app works just fine when distributed as a single unit.

--
J.B. Moreno
Jul 28 '08 #18
On Jul 20, 10:37*am, Todd Carnes <toddcar...@gma il.comwrote:
The whole idea off dll's is to get away from this. With a dll, if you
issue a bug fix for the dll, you only have to fix the dll and every
program that uses the dll gets the benefit of the fix. If you merge the
dll with your program, your program will be tied to that version of the
dll and you'll have to recompile your program every time a dll is changed..
There is a counter argument to that. The bug fix might actually break
your application if your were relying on the behavior that the bug was
causing. That's one (among many) reasons for testing your application
if anything changes including its dependencies. I'm not saying this
argument outweighs the benefits of using dlls though.
Jul 28 '08 #19
On Jul 20, 5:58*am, "Cor Ligthert[MVP]" <notmyfirstn... @planet.nl>
wrote:
Why would you never want to do this?
I think using ILMerge requires more justification than not using it.
Modularity, memory management, disk useage, and application
maintenance represent a handful of benefits for using dlls that I
could come up with off the top of head. Though, I can also think of
scenarios where ILMerge would be useful.
Jul 28 '08 #20

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

Similar topics

3
995
by: Tim Marsden | last post by:
Hi, I am trying to use ILMerge to consolidate a .exe and serval .dll's into a single .exe. (VB.NET) I am using the following command. ILMerge.exe /wildcards /log:Log.txt /keyfile:"C:\MyKey.snk" /t:winexe /out:Merged.exe Primary.exe *.dll I get the follow result at the end of my log file:
0
1383
by: drewnoakes | last post by:
Hi, I'm using ILMerge to combine various assemblies. Everything works bar one problem... the 3rd party licensed components no longer see the embedded licensing information. According to ILDAsm, both the original primary assembly and the merged output assembly contain the appropriate .mresource entry in their manifests. I'm wondering whether there's something fundamental about the license file
0
1703
by: BL | last post by:
Is there any way to merge assembly ('MyLib.dll') with declared LicenseProviderAttribute into winexe application? By now I'm getting "ILMerge.Merge: The assembly 'MyLib.dll' was not merged in correctly. It is still listed as an external reference in the target assembly." error :( Any advices??
1
2230
by: Oz Sozen | last post by:
I want to use ILMerge in my project, but it requires a framework version that I cannot find the download for (2.0.7.... something). The latest I can see is 2.0.5. Does anybody know where I can find this framework or a version of ILMerge that works with an earlier framework. Thanks.
6
2210
by: Antonio Palermo | last post by:
I don't know how to use "ILMerge", Can you help me? TIA Antonio Palermo Excuse me for my bad English, I'm italian
0
1996
by: Dennis | last post by:
I am trying to use ILMerge to create a single executable. Below are the DOS command lines that I am using: cd c:\program files\ilmerge ilmerge /lib:c:\programming\vs-projects\recipes\bin /target:winexe /out:c:\RecipeSinglePgm.exe Recipes.exe Interop.ADODB.dll Interop.ADOX.dll Interop.JRO.dll MultiBoxControl.dll MultiGridControl.dll I don't get any errors noted nor do I get the file "c:\RecipeSinglePgm.exe"
3
3796
by: JT | last post by:
Hi, I am having trouble finding information about GUIDs and strong-names and don't really know what I need. If that's too ambiguous, please tell me where to look for info on these. Here's what I am trying to accomplish: I need to know what assembly is calling methods in a web service. I also use ILMerge.exe to merge my assemblies into a single executable. One of the dlls in the executable calls the web service. I need to enforce...
0
1294
vikramadith
by: vikramadith | last post by:
I'm having some issues merging dlls into my exe Basically I have three VS projects, one producing an exe, and the other two producing dlls. Let us just call it MyApp.exe, Lib1.dll and Lib2.dll. All are written in C#. MyApp references both dlls. Now, I want the dlls to be merged into the exe, so I used ILMerge (with the Gilma UI) to do so. According to the ILMerge output, the merge works fine without any errors. However, when I try and...
1
1276
by: kulabhishek | last post by:
Hi, I am using ILMerge tool to merge the all the dlls into one. In my case I do not want to include one dll into output one. But my other dlls are using the reference of that dll. How it can be done using ILMerge? Regards Abhishek
0
9845
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11279
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9675
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 projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8047
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 presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7205
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5893
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4725
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3323
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.