Has been occurring for a while now from version 12+; currently trying to use v13.2.20132.2098. It just cost me another 4 hours’ work today, so I've come here.
I'll be going along doing my work in VsiualStudio 2012, and things will be fine, but then suddenly this error will crop up when trying to open the designer for a form containing Infragistics controls:
Key already exists Parameter name: Key Instances of this error (1) Call Stack : at Infragistics.Shared.KeyedSubObjectsCollectionBase.ValidateKeyDoesNotExist(String key, IKeyedSubObject ignoreObject)at Infragistics.Shared.KeyedSubObjectsCollectionBase.ValidateKey(String key, IKeyedSubObject ignoreObject)at Infragistics.Shared.KeyedSubObjectsCollectionBase.InternalAdd(IKeyedSubObject obj)at Infragistics.Win.UltraWinGrid.ColumnsCollection.InternalAdd(UltraGridColumn column)at Infragistics.Win.UltraWinGrid.ColumnsCollection.Add(Object obj)at Infragistics.Win.UltraWinGrid.ColumnsCollection.AddRange(Object[] columns)
What I believe is happening is that every time I go to debug the app, the Windows Form Designer code for all the Infragistics controls gets re-generated. I can see differences between two successive iterations of the designer file; appearance instances get renumbered, grid column instances get renumbered, band instances get renumbered, etc. If I happen to have the designer form open when I start the debug, then the odds of this regenerated code getting out of alignment are raised greatly, but it is by no means a sure thing that having the designer closed when debugging will keep the problem from happening. When it gets out of alignment, this error is presented, with nothing to do but hope I made a recent backup before the debug, or wading through 1000's of lines of designer-generated code looking for duplicates.
So, anyone else experiencing this? Is it an aspect of Visual Studio, or Infragistics, that this designer code re-generation even occurs? Anyone have a solution?
Hello,
We are still following this forum thread.
Please feel free to let us know if you still have any questions on this matter.
Thanks for the follow-up.
That is the entire stack, or at least as much as the IDE gives me. The error seems to occur (/most) on those forms where I have multiple levels of containers (i.e. 2 grids in a panel in a form, etc.). I cannot say I can reliably reproduce the error, as things seem to work correctly for long enough to lull me into a sense of complacency and skip the habit of backing up the designer files before every build. Then along comes an instance like last week where I lose work due to the error and no recent-enough backup. If I get a chance in the next few days I will attempt to create an example project; it strikes me that a sufficiently complex project from the online samples may work: are there any where there are multiple levels of containers?