This project has moved and is read-only. For the latest updates, please go here.

Duplicate Keys Issue (with a resolution)

Aug 1, 2011 at 6:06 PM

I had an issue where the Merge/Compare would faily complaining about an attempt to insert a duplicate key in SolutionFileReader.cs at line 377.  I grabbed the code and debugged it and found that for some reason my sln had two source control entries that were identical.  Visual Studio didn't seem to mind but the merge tool wasn't happy.

To work around the issue I put in the following code:

            if (!m_solutionFile.GlobalSections.Contains(name))
                m_solutionFile.GlobalSections.Add(new Section(
Aug 1, 2012 at 9:54 PM

This post is a year old.  Why hasn't this been implemented into the codebase?

I have the same problem from time to time.  

Aug 1, 2012 at 10:05 PM

It's because nobody loves me :) 

Aug 2, 2012 at 1:02 AM

Don't worry, it has more to do with my laziness than a lack of love ;)

To answer the question, I didn't include the work around yet because, as is, it would "silently destroy information" without telling the user (i.e. the 2nd copy of the section is forgotten). I would prefer to find a solution that let the user decide if it's OK to ignore information. That way, the user also know that something is wrong with the original file.

My plan is to accumulate all the 'warnings' that occurs while reading the files (there are other case where it would be useful) and allow the user to choose if it's OK to proceed with the merge, compare or filter.

I just need to take the time to implement it... Hopefully soon...

Jul 22, 2015 at 9:12 PM
Is this something that is still on the radar? I could really use something like this as well right now.