In the context of some other thread I tried to ILMerge a set of Infragistics WinForms 13.2 assemblies.
Unfortunately the merging fails there. I did the following:
"\Program Files (x86)\Microsoft\ILMerge\ILMerge.exe" /copyattrs /allowMultiple /log:mergeresults.txt /out:Merged.UI.Ext.dll /targetplatform:v4,"C:\Windows\Microsoft.NET\Framework\v4.0.30319" Infragistics4.Win.v13.2.dll Infragistics4.Shared.v13.2.dll Infragistics4.Win.Misc.v13.2.dll Infragistics4.Win.UltraWinGrid.v13.2.dll Infragistics4.Win.UltraWinEditors.v13.2.dll
I get the error:
ERROR!!: Duplicate type 'Infragistics.Win.UIAutomation.UiaProviderControlNativeWindow' found in assembly 'Infragistics4.Win.UltraWinGrid.v13.2'. Do you want to use the /alllowDup option?An exception occurred during merging:ILMerge.Merge: ERROR!!: Duplicate type 'Infragistics.Win.UIAutomation.UiaProviderControlNativeWindow' found in assembly 'Infragistics4.Win.UltraWinGrid.v13.2'. Do you want to use the /alllowDup option?at ILMerging.ILMerge.MergeInAssembly(AssemblyNode a, Boolean makeNonPublic, Boolean targetAssemblyIsComVisible)at ILMerging.ILMerge.Merge()at ILMerging.ILMerge.Main(String[] args)
No output is generated. Adding the /allowDup option generates:
An exception occurred during merging:Unresolved assembly reference not allowed: UIAutomationProvider.at System.Compiler.Ir2md.GetAssemblyRefIndex(AssemblyNode assembly)at System.Compiler.Ir2md.GetTypeRefIndex(TypeNode type)at System.Compiler.Ir2md.VisitReferencedType(TypeNode type)at System.Compiler.Ir2md.VisitMethod(Method method)at System.Compiler.Ir2md.VisitInterface(Interface Interface)at System.Compiler.Ir2md.VisitModule(Module module)at System.Compiler.Ir2md.SetupMetadataWriter(String debugSymbolsLocation)at System.Compiler.Ir2md.WritePE(Module module, String debugSymbolsLocation, BinaryWriter writer)at System.Compiler.Writer.WritePE(String location, Boolean writeDebugSymbols, Module module, Boolean delaySign, String keyFileName, String keyName)at System.Compiler.Writer.WritePE(CompilerParameters compilerParameters, Module module)at ILMerging.ILMerge.Merge()at ILMerging.ILMerge.Main(String[] args)
Again not output is generated.
Isn't it possible to merge the v13.2 assemblies?
Best regards
Uwe
Thanks for the feedback Uwe !
Have a nice day and Merry Christmas !
Thanks Georgi,
that worked. I had to remove the /wildcards option though and I do not have the v4.0 folder in the Reference Assemblies path so my post build looks like this:
"\Program Files (x86)\Microsoft\ILMerge\ILMerge.exe" /copyattrs /allowMultiple /allowDup /ndebug /closed /log:mergeresults.txt /out:Merged.UI.Ext.dll /targetplatform:v4,"C:\Windows\Microsoft.NET\Framework\v4.0.30319" Infragistics4.Win.v13.2.dll Infragistics4.Shared.v13.2.dll Infragistics4.Win.Misc.v13.2.dll Infragistics4.Win.UltraWinGrid.v13.2.dll Infragistics4.Win.UltraWinEditors.v13.2.dll
I think the crucial steps was to have the UIAutomation dlls local and to use the /closed option.
Hello Uwe,
unassal said:Isn't it possible to merge the v13.2 assemblies?
“C:\Program Files (x86)\Microsoft\ILMerge\ILMerge.exe” /wildcards /copyattrs /allowMultiple /allowDup /ndebug /closed /targetplatform:v4,"%ProgramFiles%\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0" /log:"D:\Workdir\Projects\UltraGridCustomFilterILMerge_4\UltraGridCustomFilterILMerge\ILMerge.log" /out:"D:\Workdir\Projects\UltraGridCustomFilterILMerge_4\UltraGridCustomFilterILMerge\PublishMerged1.dll" "D:\Workdir\Projects\UltraGridCustomFilterILMerge_4\UltraGridCustomFilterILMerge\bin\Debug\Infragistics4.Shared.v13.2.dll" "D:\Workdir\Projects\UltraGridCustomFilterILMerge_4\UltraGridCustomFilterILMerge\bin\Debug\Infragistics4.Win.Misc.v13.2.dll" "D:\Workdir\Projects\UltraGridCustomFilterILMerge_4\UltraGridCustomFilterILMerge\bin\Debug\Infragistics4.Win.UltraWinGrid.v13.2.dll" "D:\Workdir\Projects\UltraGridCustomFilterILMerge_4\UltraGridCustomFilterILMerge\bin\Debug\Infragistics4.Win.v13.2.dll" "D:\Workdir\Projects\UltraGridCustomFilterILMerge_4\UltraGridCustomFilterILMerge\bin\Debug\Infragistics4.Win.UltraWinEditors.v13.2.dll"
Let me know if you have any questions.
Regards