dotnet / ILMerge

ILMerge is a static linker for .NET Assemblies.
MIT License
1.23k stars 170 forks source link

how to merge my program and dlls with relative directory path #47

Open lazebird opened 6 years ago

lazebird commented 6 years ago

i have a winform project release like this: a.exe b.dll c.dll en-US/d.dll

i use ./ILMerge.exe /targetplatform:v4 /ndebug /target:winexe /out:sa.exe a.exe b.dll c.dll en-US/d.dll but when i run sa.exe, it says d.dll cannot be loaded. i am new to ILMerge, is there anyone who can help me? thanks

lextm commented 6 years ago

https://stackoverflow.com/questions/1613407/ilmerge-and-localized-resource-assemblies

This Stack Overflow thread is well known.

lazebird commented 6 years ago

@lextm thanks for your reply. i just read this thread, it write a class to override resource-finding fallback mechanisms... i want to know if there is a better method, no coding, no changes after every update of XXX.Designer.cs perhaps ILMerge.exe/ILRepack.exe can add path/directory support in the future? i have an stupid method, compress my release directory to a .rar file, set self-extraction and auto execute my program after the extraction. it works, but not perfect too... if there is any better method, or better plan, please tell me here, thanks all

lextm commented 6 years ago

There seems to be no "better method, no coding, no changes".

.NET Core 3.0 should finally eliminate the needs of ILMerge/IL Repack as well, if Microsoft can fulfill the promise to "bundle your app and .NET Core together as in a single executable",

https://blogs.msdn.microsoft.com/dotnet/2018/05/07/net-core-3-and-support-for-windows-desktop-applications/

lazebird commented 6 years ago

@lextm ok, i accept, thanks