Jamie, I have just run into a duplicate key issue also, and the
affected classes are part of visual studio generated Web References -
I have 2 partial classes named the same but are in different
namespaces (in differnet web references) and they appear to be
resolving to the same namespace at this line:
matchedAssociations.Add(association.Name.CloneAsNamespace(), doc); //
throws 'item with same key already added' exception
On 2 May, 21:38, Jamie Penney <
ja...@jamiepenney.co.nz> wrote:
> Is it possible that theduplicatemethods were the declaration and
> > ...to check forduplicatekeys in the matchedAssociations collection
> > else I was getting an exception at this point too. Interestingly,
> > there was actually already a nearly 100% identical line in the
> > 'sister' class, MethodGenerator, that contained exactly this very same
> > check code along with a comment that explains what's going on...
>
> > if (matchedAssociations.ContainsKey(association.Name))
> > return; // weird case when a type has the same method
> > declared twice
>
> > ...so fixing the PropertyGenerator.Add(...) method was literally a
> > matter of just adding the same check that someone on the team had
> > already added to the MethodGenerator.Add(...) method to solve the same
> > issue with that class' collection. I agree with the comment that the
> > condition is indeed weird as it seems like it shouldn't be permitted
> > to exist in the source code of the assembly being analyzed, but I have
> > to say that whatever causes this condition pretty clearly exists in
> > the NHibernate source *somewhere* :D
>
> > In any case, I hope this thread helps you guys nail down the *correct*
> > changes to the source to resolve whatever these issues are in the way
> > that most makes sense for Docu; as I said, these simple edits and
> > hacks got my build of Docu to the point where it could reasonably
> > compile the NH XML code comments without any exceptions and that's all
> > I sort of needed for my near-term evaluation.
>
> > Hope this helps somewhat!
>
> > -Steve B.- Hide quoted text -
>
> - Show quoted text -