364,033 Members | 4770 Browsing Online
Community for Developers & IT Professionals
Bytes IT Community

How can I embed a .dll into my final .exe

cis4life
P: 3
Hello,

I developed an windows application and I have a .dll that currently sits outside the dll. If possible, I would rather embed somehow the .dll so I could distrubute the application without having to distrubute the external .dll.

is this possible, and if so, how do I go about doing this?

I'm using VS.NET (C#) 2005

Thanks for any help you can offer,

Thanks,
Cedric
Feb 26 '07 #1
Share this Question
Share on Google+
11 Replies


vijaydiwakar
100+
P: 562
Hello,

I developed an windows application and I have a .dll that currently sits outside the dll. If possible, I would rather embed somehow the .dll so I could distrubute the application without having to distrubute the external .dll.

is this possible, and if so, how do I go about doing this?

I'm using VS.NET (C#) 2005

Thanks for any help you can offer,

Thanks,
Cedric
have u tried to add reference
Feb 26 '07 #2

cis4life
P: 3
yes,

Thats not the issue. The issue is the final output is that I have the .exe and the external .dll. I want to be able to embed the .dll into the .exe so when I distrubute the app, I only have the 1 .exe and not 2 files (.exe and the .dll)
Feb 26 '07 #3

vijaydiwakar
100+
P: 562
yes,

Thats not the issue. The issue is the final output is that I have the .exe and the external .dll. I want to be able to embed the .dll into the .exe so when I distrubute the app, I only have the 1 .exe and not 2 files (.exe and the .dll)
in such case u've to write the code in any classmodule of that application
Feb 26 '07 #4

dawoodledawi
P: 3
Dear Mr
Just Make Run to your project and go to dirctoy or your project \bin \you have file .exe just copy then past anywhere you need

Dest Reagrd
D.A.L
Feb 26 '07 #5

radcaesar
Expert 100+
P: 755
Just integrate the .dll code inside ur project as an module.

But its a bad practice and not recommended. It will violate OOP system definitions.

:)
Feb 26 '07 #6

cis4life
P: 3
The dll is a royalty free lib. I purchased, and though I can freely distrubute the library. I don't want everyone who purchase this app to have access to this lib. So I can't just place the code inside a class in my app, cause I don't have access to the source.

There's no tools to embed dll's inside of .exe's???

Thanks for the replies so far, just trying to figure out how I'm going to distrubute this application.

Cedric
Feb 26 '07 #7

dorinbogdan
Expert 100+
P: 817
This link may be helpful.
Feb 26 '07 #8

UEH1
P: 5

Plater
Expert Mod 5K+
P: 7,575
You might be able to do something sneaky with the resources. I think you need to create an unmanaged resource or something and bind the library inside it to be linked. I've never attempted this, but I seem to recall people doing it back in days of yor.
Jun 30 '08 #10

sanii
P: 1
Try the free utility from Microsoft called 'ILMerge' available at Download details: ILMerge. It enables merging all assemblies that an app uses (.dlls, .exes) into one .exe for easier deployment purposes via the regular Build process in Visual Studio.
Jan 7 '09 #11

NitinSawant
100+
P: 264
use ILMerge,


you can merge dll and exe's into one final exe for easy redistribution.
Jan 10 '09 #12

Post your reply

Help answer this question



Didn't find the answer to your C# / C Sharp question?

You can also browse similar questions: C# / C Sharp