7

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

3 Answers 3

5

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.

3
  • I have the same issue. After deleting .vcxproj.filters it works fine
    – sergtk
    Jan 17, 2013 at 10:06
  • I have hang up of Visual Studio 2010 even when I add first filter to the project. But this is for relatively large solution, for others, smaller - it's ok.
    – sergtk
    Jan 17, 2013 at 10:12
  • The same thing happened to me in Visual Studio 2013. Strange that on other PC's for the same Sandbox I didn't had to do such workaround.
    – Pinte Dani
    Apr 16, 2015 at 7:54
0

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]

0

i had same probleb do the following thing in windows explorer

Based on my understanding, you will get the same error even when you create every simple Visual C++ windows phone project from VS2012. In this case, I doubt that the issue is related to your VS.

And according to Konrad’s reply in this thread with similar issues: http://social.msdn.microsoft.com/Forums/en-US/cba01040-067e-4ac3-ba4c-a8a14ba3c45d/unable-to-read-the-project-file, I feel that you can check if this file: C:\Program Files(x86)\MSBuild\Microsoft\WindowsPhone\v7.0\Microsoft.Cpp.Windows Phone.7.0.targets is on your system. If it is not there, I doubt that your VS installation is wrong.

If you are not using VS Express, you could locate to the IDE folder then run these commands to check if it can help:

Please open Windows Explorer, and navigate to  <Visual Studio Installation Path>\Common7\IDE
Devenv.exe /SafeMode: Launches the IDE in safe mode loading minimal windows.
Devenv.exe /ResetSettings: Restores the IDE's default settings, optionally resets to the specified VSSettings file.
Devenv.exe /ResetAddin: Removes commands and command UI associated with the specified Add-in.
Devenv.exe /ResetSkipPkgs: Clears all SkipLoading tags added to VSPackages.

If no help, I suggest you try repairing your VS or uninstall it and then reinstall it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.