Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vcxproj file won't load into solution

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

like image 573
John C Avatar asked Apr 29 '10 18:04

John C


1 Answers

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.

like image 166
John C Avatar answered Sep 19 '22 16:09

John C