I just upgraded my assembly references from Infragistics 14.1 to Infragistics 15.2. For one particular form, I cannot open the form in design mode in Visual Studio and the build server throws an error.
This is the error I'm getting in desing view -
Object of type 'System.Collections.Generic.List`1[Infragistics.Win.UltraWinTree.UltraTreeNode]' cannot be converted to type 'System.Collections.Generic.List`1[Infragistics.Win.UltraWinTree.UltraTreeNode]'.
This is the error I’m getting from the build server –
Facility Manager\Main\Facility Manager\Source\NCS.FacilityManager.Windows.Forms\Forms\Staging\StagingSubmissionDialog.resx (133, 5)
Invalid Resx file. Could not load type System.Collections.Generic.List`1[[Infragistics.Win.UltraWinTree.UltraTreeNode, Infragistics4.Win.UltraWinTree.v14.1, Version=14.1.20141.2165, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 which is used in the .RESX file. Ensure that the necessary references have been added to your project. Line 133, position 5.
This is the problematic entry in the .resx file and the corresponding .net code that calls it:
this.stagingHierarchyDataView.SubmittedNodes = ((System.Collections.Generic.List<Infragistics.Win.UltraWinTree.UltraTreeNode>)(resources.GetObject("stagingHierarchyDataView.SubmittedNodes")));
<data name="stagingHierarchyDataView.SubmittedNodes" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAL4BSW5mcmFnaXN0aWNzNC5XaW4uVWx0cmFXaW5UcmVlLnYxNC4x
LCBWZXJzaW9uPTE0LjEuMjAxNDEuMjE2NSwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj03
ZGQ1YzMxNjNmMmNkMGNiXV0sIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJh
bCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQwDAAAAb0luZnJhZ2lzdGljczQuV2luLlVs
dHJhV2luVHJlZS52MTQuMSwgVmVyc2lvbj0xNC4xLjIwMTQxLjIxNjUsIEN1bHR1cmU9bmV1dHJhbCwg
UHVibGljS2V5VG9rZW49N2RkNWMzMTYzZjJjZDBjYgUBAAAATlN5c3RlbS5Db2xsZWN0aW9ucy5HZW5l
cmljLkxpc3RgMVtbSW5mcmFnaXN0aWNzLldpbi5VbHRyYVdpblRyZWUuVWx0cmFUcmVlTm9kZQMAAAAG
X2l0ZW1zBV9zaXplCF92ZXJzaW9uBAAALUluZnJhZ2lzdGljcy5XaW4uVWx0cmFXaW5UcmVlLlVsdHJh
VHJlZU5vZGVbXQMAAAAICAIAAAAJBAAAAAAAAAAAAAAABwQAAAAAAQAAAAAAAAAEK0luZnJhZ2lzdGlj
cy5XaW4uVWx0cmFXaW5UcmVlLlVsdHJhVHJlZU5vZGUDAAAACw==
</value>
How do I update what's been serialized in the resx file to point to Infragistics 15.2 instead of Infragistics 14.1?
I’d appreciate any help. Thanks!
Hi Darlene,
So judging by the error message, you somehow serialized a generic List<UltraTreeNode> into your resx file. As far as I am aware, the tree control exposes no generic Lists, so this must be a list in your code somewhere and so you must also have code which somehow serializes this list into the resx file.
I'm not really an expert on resx files and I can't say I've ever serialized an object into one via code. So frankly, you might be better off asking this question on a more general Microsoft or DotNet programming forum, since this issue isn't really specific to the Infraigstics controls - it would apply to any class whose version or assembly changed.
About the only useful advice I can think to offer you here is that the tree control (and many of the other Infragistics WinForms controls) have a feature to save the layout of that control into an xml file, which I think it pretty similar to how the resx files work. And the way we deal with this kind of issue with with a Binder class. Our Binder basically overrides certain methods like FindType so that when the SOAP formatter is looking for a particular type of a particular version, we can ignore the version and direct it to whatever version of that type happens to be in memory. This is really complicated and advanced stuff, though. And my guess is that whatever information is in that list is probably some user-customization for your app and probably isn't worth the difficulty you will encounter in trying to convert it to a newer version.
But like I said, I'm not really an expert on resx files and a more general C# or DotNet forum might yield an easier solution.