Hello,
in order to avoid a deployment conflict I considered merging the Infragistics WinForms assemblies into a single assembly (using ILMerge). Since the release notes for v11 contain specific instructions on how to do it I assume this is a supported approach to deploy Infragistics.
A (simple) test application that I built using these merged assemblies ran ok - until I wanted to load an ISL file that has been built using the v11 AppStylist. StyleManager.Load throws a ReflectionTypeLoadException when deserializing a GlyphInfo data structure (or when reading an image - that's the next failure when I removed the Glyphs from the ILS file). Update: the exception during image load is handled but the exection for the GlyphInfo is not. The application terminates with this exception:
---> System.InvalidCastException: Unable to cast object of type 'Infragistics.Win.CheckBoxImageGlyphInfo' to type 'Infragistics.Win.GlyphInfoBase'. at Infragistics.Win.AppStyling.StyleUtilities.ParseGlyphInfo(String value) at Infragistics.Win.AppStyling.CustomPropertyInfo.LoadContents(XmlReader reader, StyleParseInfo parseInfo, String endTag) at Infragistics.Win.AppStyling.ComponentStyleInfo.Create(XmlReader reader, StyleParseInfo parseInfo) at Infragistics.Win.AppStyling.StyleSetInfo.LoadContents(StyleSetInfo styleSet, XmlReader reader, StyleParseInfo parseInfo, Boolean parseOnlyTargets) at Infragistics.Win.AppStyling.StyleSetInfo.LoadContents(StyleSetInfo styleSet, StyleParseInfo parseInfo, Boolean parseOnlyTargets) at Infragistics.Win.AppStyling.StyleSetInfo.Create(XmlReader reader, StyleParseInfo parseInfo) at Infragistics.Win.AppStyling.StyleLibraryInfo.Import(XmlReader reader, StyleLoadOption loadOption, StyleLibraryCategories categories) at Infragistics.Win.AppStyling.StyleLibraryInfo..ctor(Stream stream, StyleLoadOption loadOption, StyleLibraryCategories categories) at Infragistics.Win.AppStyling.StyleLibraryInfo..ctor(Stream stream, StyleLoadOption loadOption) at Infragistics.Win.AppStyling.StyleManager.Load(Stream stream, Boolean validate, String styleLibraryName) at Infragistics.Win.AppStyling.StyleManager.Load(Stream stream, Boolean validate)
I assume that the binary elements in the ISL file (in this case the GlyphInfo) are some serialized Infragistics types that cannot be found in the merged Infragistics assembly (since the type identity changed).
However, the Infragistics AppStylist of v13 can read the file properly. So there must be a way to read (and use?) this file even when the original assemblies are not available. Is that correct?
So the question is: is there a way I can make use of this ISL file with my merged Infragistics assemblies?
Thanks
Uwe
Hello Uwe,
I try to reproduce your issue using a small sample with UltraGrid. I merged these assemblies:
Infragistics4.Shared.v11.2
Infragistics4.Win.Misc.v11.2
Infragistics4.Win.UltraWinGrid.v11.2
Infragistics4.Win.v11.2
and after that I apply different AppStyles to my application and at a first look everything seems to works properly. Please take a look on attached video file for more details and if you think that I didn`t reproduce your scenario, please feel free to write me
Regards
Hello Georgi,
thanks for the quick response. Looks pretty much like what I try to do. Can you try to use the attached .ISL file? Could you please post the command line you were using for ILMerge?
Thanks and best regards
Thanks for the details. I try to reproduce your issue using version 11.2 with CLR2.0, your AppStyle and these assemblies below
Infragistics2.Shared.v11.1.dll
Infragistics2.Win.Misc.v11.1.dll
Infragistics2.Win.UltraWinEditors.v11.1.dll
Infragistics2.Win.UltraWinGrid.v11.1.dll
Infragistics2.Win.v11.1.dll
and everything works properly. After that I repeat my test again, but this time I used version 11.1 - 11.1.20111.2111 (like it is in your scenario), your AppStyle and I was able to reproduce the same issue that you describe. But when I change your AppStyle with one of our default styles (for example IG or Nautilus) the same sample works properly.
So, I think that we have two possible options to solve your problem.
Option 1: If it is possible for you, you could upgrade your project to version 11.2 or higher
Option 2: To modify your AppStyle in a GlyphInfo part
Please note that in my tests I used "/copyattrs /allowMultiple"
Let me know if you have any questions.
thanks again - I really appreciate the responsive support you provide!
I think we will probably move on to version 11.2. I assume the problem does not exist with the most current version, too (13.2 afaik) - so we will consider this option, too.
Best regards
I do not have 11.2 available (all colleagues with the appropriate licenses are not in the office today - others have access for v12 and later but they don't get access to the older ones - nasty).
I wanted to check the 13.2 option anyway - so I tried with my trial download of that.
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?
In the meantime confirmed that it works with 11.2. I will close this thread and submit a new question for the 13.2 merge issue mentioned above.
Thanks for your response. I`ll check with version 13.2 and I`ll inform you about results in your new thread: http://ko.infragistics.com/community/forums/t/85789.aspx