0

I have a whole list of dlls that go into a program. My boss is wanting all the dlls to be packaged into the exe or some other way that the user doesn't see all the dll files.

I used ILMerge and ILMerge-GUI to merge everything into one exe.

However, when I run the program and choose a file to deserialize the program can no longer do it properly and keeps returns a null object.

I found that due to the fact that the file I want to deserialize was serialized in a non merged assembly I cannot use ILMerge to accomplish my task.

When I run the ILMerged program deserializing return a null object. When I run the program how it was compiled (with dlls all separate) deserializing returns an object I can use.

So is there another way to merge all my dlls into one file without losing the ability to deserialize objects?

I have no ability to change any of the assemblies I am using, but am required to use them or the program wont work properly.

  • Possible duplicate of [.NET type definitions in merged assemblies (ILMerge)](http://stackoverflow.com/questions/1682443/net-type-definitions-in-merged-assemblies-ilmerge) – Jason Watkins Mar 29 '16 at 21:34
  • Use [LibZ](https://github.com/MiloszKrajewski/LibZ), it's good. – Lucas Trzesniewski Mar 29 '16 at 21:44
  • @JasonWatkins I looked at that question the answers still wouldn't help for files that have already been serialized – Joshua Davis Mar 29 '16 at 23:21
  • Unless you write manual code to deserialize, what you want to achieve is impossible. Merging assemblies change how the internals look, so things already serialized cannot be deserialized (as automatic serialization/deserialization relies on the old internals). – Lex Li Mar 30 '16 at 01:35

0 Answers0