ILMerge problem because of XamlGeneratedNamespace
-
Wednesday, April 23, 2008 8:32 PM
I am trying to use ILMerge to merge several assemblies, but I get an error because of a duplicate type:
XamlGeneratedNamespace.GeneratedInternalTypeHelper
This is because two assemblies use WPF.
Is there any way to specify the namespace used for the generated GeneratedInternalTypeHelper.g.cs file? Or am I out of luck using ILMerge with multiple WPF assemblies?
-Larry
Answers
-
Tuesday, April 29, 2008 9:57 AM
Hi Lawrence,
Unfortunately that namespace generated by XAML compiler is hard coded, and you cannot change it in current version of WPF, one possible way to change the auto-generated namespace is to use ildasm to disassembly the assembly, dump it into IL file, and change the namespace in IL code, and then recompile it using ilasm.exe IL compiler.
Hope this helps
All Replies
-
Friday, April 25, 2008 4:54 PM
Is there another forum I should post this question on?
-
Tuesday, April 29, 2008 9:57 AM
Hi Lawrence,
Unfortunately that namespace generated by XAML compiler is hard coded, and you cannot change it in current version of WPF, one possible way to change the auto-generated namespace is to use ildasm to disassembly the assembly, dump it into IL file, and change the namespace in IL code, and then recompile it using ilasm.exe IL compiler.
Hope this helps -
Tuesday, April 29, 2008 3:43 PM
Hi Marco,
Thanks for the reply and for the workaround.
Please consider a fix for this in a future WPF release. It would make things easier.
Thanks!
-Larry

