Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
625
Merging Infragistics assemblies with ILMerge - using ISL style files
posted

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