5

I am building a library and have a third-party assembly that, for whatever reason I want to package as an embedded resource and not expose as an additional DLL.

My client ILMerges my library into their executable. However, if I give them my library with the embedded resource, they get a "Unresolved assembly reference not allowed" exception.

Since I don't want to wrap my entire interaction with the third party assembly in reflection code, I want to keep the reference in library.

Is there a way to tell ILMerge to ignore a particular unresolved assembly reference?

afeygin
  • 1,213
  • 11
  • 26
  • you probably have to change your dlls to not depend on it. i don't see how it could work with a missing dependency, because they *depend* upon it being there. – DLeh Apr 01 '15 at 20:57
  • 1
    The dependency isn't missing--its an embedded resource which gets dynamically loaded during runtime. It just looks like its missing to ILMerge. – afeygin Apr 01 '15 at 20:59
  • If you use Fody Costura to include your 3rd party dll, maybe the easiest way would be for you to ILMerge/ILRepack it instead. ILMerge isn't the only issue your client can have, any reflection work may miss the referenced assembly. – Gluck May 06 '15 at 06:50

0 Answers0