Hello,
we are developing an application which allows to integrate plugins which are developed by other parts of our company or even external companies. We are using a particular version of Infragistics WinForms - however Infragistics types are not in the interfaces that we use to interact with the plugins. So in general plugins could use Infragistics, too, without running into the danger of Invalid Cast Exceptions.
For the purpose of this question pls. disregard the deployment question (plugins overwriting each others or our Infragistics assemblies). Consider that to be solved.
The remaining question is: are there other issues that I should expect in such a context? Some initial tests I did where rather promising - but that was of course not really comprehensive.
How are global settings like styles etc. handled? Will I see "cross-talk" between the different versions? Will this depend upon how different the versions are (different build vs. different major release)?
In case there are issues to expect: what other options do I have to support a plugin architecture as described? Ask plugin developers to use another UI lib?
Thanks
Uwe
Not sure where I got it from. I'm calling it like this: "\Program Files (x86)\Microsoft\ILMerge\ILMerge.exe" /copyattrs /allowMultiple /log:mergeresults.txt /out:My.Infragistics.Win.dll /targetplatform:v2,"C:\Windows\Microsoft.NET\Framework\v2.0.50727" Infragistics2.Win.v11.2.dll Infragistics2.Shared.v11.2.dll Infragistics2.Win.Misc.v11.2.dll Infragistics2.Win.UltraWinGrid.v11.2.dll Infragistics2.Win.UltraWinEditors.v11.2.dll Infragistics2.Documents.Reports.v11.2.dll Infragistics2.Win.UltraWinGrid.DocumentExport.v11.2.dll Infragistics3.Documents.Excel.v11.2.dll Infragistics3.Documents.IO.v11.2.dll Infragistics3.Win.UltraWinFormattedText.WordWriter.v11.2.dll Infragistics3.Win.UltraWinGrid.ExcelExport.v11.2.dll Infragistics3.Win.UltraWinGrid.WordWriter.v11.2.dll
The order of the assemblies is important (because of the dependencies).
Since the assemblies will have different names the actual types will be different and can co-reside in memory. Furthermore you don't have conflicts in the file system. It worked for me.
Hi Uwe,
Thanks for sharing this insight. I never used ILMERGE but started investigating it. It seems that there are many versions of it, how do you get it? From Nugget? Does it work with .Net 4.7?
Also, it seems that this is a good approach for merging multiple assemblies into one, I'm not sure how this could solve the problem of mixing different versions of Infragistics assemblies. I have a winform main app that I always update to the latest Infragistics version, however this app calls other custom secondary assemblies (sort of plugins) that also use Infragistics that I don't update, and that creates a problem. I think the different Infragistics version clash somehow.
Have a great day.
Fabian
Hi Fabian, sure - what we essentially did was to ILMerge the Infragistics assemblies. This avoids installation issues and the Infragistics types from the ILMerge assembly have a different identity than the original ones. This works as long as you don't want to assign types from the different assemblies to each other.
I hope this helps.
I'm facing a similar problem with mixed versions of Infragistics controls. Would you be willing to connect with me and share your approach?
Thank you.
Hello Uwe,
Thank you for contacting Infragistics.
As long as the interfaces between the plugins and the application do not pass Infragistics objects back and forth, it should work.