By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,083 Members | 1,254 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,083 IT Pros & Developers. It's quick & easy.

Problem merging assemblies with ILMerge

vikramadith
P: 12
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 run the merged exe, I get a LoaderException, and apparently, it is still searching for Lib2.dll!

The problem is only with Lib2. I confirmed this by merging MyApp.exe with Lib1.dll and running it in the same folder as Lib2.dll, and it works. But if I merge Lib2.dll as well, then it doesn't.

I've checked the project properties, and I can't see any differences that might make Lib1 work and Lib2 fail.

Can anyone think of *possible* reasons why this might have failed? Remember, ILMerge output shows that no errors occurred.
Oct 12 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.