views:

153

answers:

2

We've just recently switched to VS 2010 and i had a solution that was working fine. This moring when i try to load the solution i get the error:

"An item with the same key has already been added."

This occurs when it is trying to load one of our main projects and it is not loaded.

I assumed the problem was with my solution so i created a brand new empty solution and tried to load the same vcxproj and got exactly the same error.

When i revert the project file to a previous version it works, so apparently it's something in the vcxproj file. However it also appears that i'm the only one in the office that is affected. So some combination of the vcxproj file and my computer seems to be the issue.

Has anyone seen anything like this before? Any ideas on a solution? Thanks

+1  A: 

Still not sure what caused the issue however deleting all temporary files:

<proj>.vcxproj.user
<proj>.vcxproj.filters
<proj>.vcproj.<domainname???>.<username>.user
<proj>.suo

has fixed the problem.

I suspect it was just

<proj>.vcxproj.user
<proj>.vcxproj.filters

or both that actually fixed it but I did delete all 4 so it could have been any of them.

The change to the vcxproj file that casued the break was renaming some files and adding some files, so my guess is that one of the generated files had a stale reference that was blocking the load.

John C
A: 

If you figure out how to get the message again, maybe you could open a bug at https://connect.microsoft.com/ and attach the zipped up .vcxproj and *.sln files so we can fix it.

Dan [msbuild]

dan moseley