Visual Studio 2010 Unknown Build Error, Item Has Already Been Added

After converting a solution from Visual Studio 2008/.NET 3.5 to 2010/.NET 4.0, building it resulted in this error: “Unknown build error, ‘Item has already been added. Key in dictionary: ‘…’”. Howver, after a second build try (for example, using F5 or Ctrl+F5), the process completed successfully an the application started normally.

After many research hours, we’ve identified the issue: in our solution, within the project that initially failed to build, there were 2 Icon.ico files, one in the Properties folder, and one referred as a link from a different folder, but shown as a link in the same Properties special folder of the project. Visual Studio 2008 didn’t complain about it, but Visual Studio 2010 does.

We have resolved the issue by removing one of the Icon.ico files (the actual Properties/Icon.ico file), that wasn’t used as a resource in the project anyway (it was added there just because the link file didn’t work as an icon resource for the application due to a manifest error, but the file existed also in an Images folder where we could use it from; the link file was important because of some internal work).

I hope this would help someone, sometime, as this issue was very difficult to narrow down and resolve (the error message shown by Visual Studio 2010 wasn’t helpful at all).


About Sorin Dolha

My passion is software development, but I also like physics.
This entry was posted in Computers and Internet. Bookmark the permalink.

One Response to Visual Studio 2010 Unknown Build Error, Item Has Already Been Added

  1. Sunny Rajwadi says:


Add a reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s