0

I'm looking for a free tool to merge all of my wpf application's assemblies into a single assembly. Usually, I use ILMerge, but unfortunately, it does not support merging WPF assemblies. Are there any tools out there which can achieve that?

A commercial tool is not an option for me because the application is an open source project.

Best Regards,
Oliver Hanappi

buckley
  • 12,834
  • 2
  • 47
  • 56
Oliver Hanappi
  • 11,682
  • 7
  • 51
  • 68
  • Are you getting an error when trying to merge WPF assemblies? Those should still be .Net assemblies, which should make them usable to ILMerge. – Hugo Oct 01 '10 at 22:28
  • @Hugo ILMerge doesn't know about BAML, so the resources are broken when you merge stuff. – Ana Betts Oct 01 '10 at 22:36
  • Ah, good to know, thanks for the clarification Paul. There's my mandatory one new thing to learn for today! – Hugo Oct 02 '10 at 14:22

2 Answers2

7

Costura can do this.

It embeds references as resources in the target assembly. Then at run time intercepts assembly load events and serves up the resource.

https://github.com/Fody/Costura

Kyriacos
  • 83
  • 1
  • 2
  • 5
Simon
  • 32,406
  • 17
  • 127
  • 196
1

I see two relevant solutions:

  1. Implement your assembly resolution handling at runtime so ilmerge'd WPF assemblies do work: http://blog.mahop.net/post/Merge-WPF-Assemblies.aspx

  2. Use a product that supports it out of the box (Commercial, so not an option in the case below): Merging dlls into a single .exe with wpf

Community
  • 1
  • 1
Jeff
  • 34,597
  • 14
  • 103
  • 210