7

I'm currently having some issues with some of my TDS item files, where I get the following error:

Duplicate Sitecore ID's found in files sitecore\templates\xxx\Data.item and sitecore\templates\xxx\Data.item TDSProject C:\Program Files (x86)\MSBuild\HedgehogDevelopment\SitecoreProject\v9.0\HedgehogDevelopment.SitecoreProject.targets

I am not sure that this actually means, since it's basically telling me that the duplicated ID's are between the same file. Moreover, when I look in the Data.item file on the filesystem, it does not contain any internal ID duplicates, and I've verified that the file does not exist multiple places.

Any suggestions on where I should be looking?

  • Are any of your colleagues seeing this issue from the same repo (I'm assuming this in source control)? What happens if you delete the item on disk and get the item from Sitecore again? – Corey Smith Oct 6 '16 at 14:53
7

I also ran into this issue when I had an item in Sitecore that had the same path as the item in TDS but a different ID. Look at your Content Tree and see if something is there with the same path and then compare the IDs between the TDS item and the Sitecore item.

|improve this answer|||||
5

I have had a similar problem before. It was related to TDS caching. Try closing and reopening visual studio as it will clear the TDS cache. Hope that helps!

|improve this answer|||||
  • Just tried that, unfortunately that didn't seem to do the trick - but good to know that caching issues can provoke such errors as well. – Søren Engel Oct 6 '16 at 13:53
  • 2
    Rather than closing VS entirely: run Clean on the TDS project directly, it will clear the cache. – zzzzBov Oct 7 '16 at 17:06
  • Worked for me! Thanks to @zzzzBov for the tip – tjans Sep 14 '18 at 19:32
2

Your question mentions the file C:\Program Files (x86)\MSBuild\HedgehogDevelopment\SitecoreProject\v9.0\HedgehogDevelopment.SitecoreProject.targets

Did you check that file for multiple instances if the ID of the relevant item? As far as I recall, this is not the file presented to you by VS when unloading project, then editing as text.

|improve this answer|||||
  • That's correct. The file you mention is (to my knowledge) simply just something that is part of the TDS build system. It does not hold any information about the files in the TDS project. I think the reason why that file is part of the error ouput, is simply because is the build file in which an error happens due to something different. The file I've looked for duplicates in is the actual TDS project file, which I unloaded and went over for duplicates. – Søren Engel Oct 6 '16 at 14:16
2

I had a similar error today and created a question about it:

Duplicate item errors when syncing a TDS project

Although the error is not exactly the same, try this fix:

  1. Go to Tools→Options→TDS Options and set Background Cache Loading to False.

enter image description here

  1. Restart Visual Studio.
  2. Set Background Cache Loading back to True.

For me, errors stopped after performing these steps.

|improve this answer|||||
1

Check the project file in a raw text editor, looking for item name and ID.

There is a good chance that a merge has caused your item to be included twice.

I have seen this happen with TDS merges at least once before.

|improve this answer|||||
  • I've tried to unload the TDS project file as well, but the item is only included once. A similar advice was suggested on the Sitecore Slack channel, and that would have made perfectly good sense. However, the Sitecore being complained about, is only included once in the project file. – Søren Engel Oct 6 '16 at 14:02
1

To fix this, I eventually just opened the TDS project in text editor and removed the duplicate item in question. I could then re-sync the items without any problems.

|improve this answer|||||
0

I have seen that. In my case was just a conflict in which I could safely update the project with my version. After I did that it stopped showing this message. Keep in mind that I could safely overwrite the project version.

|improve this answer|||||
0

Our issue was due to corruption of our TDS.Master.scproj file. If you need to fix I'd look for duplicates in that file instead of where the error message suggests, which is in the HedgehogDevelopment.SitecoreProject.targets file. We actually ended up rolling back a sloppy commit and that fixed our issue.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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