Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
712 views
in Technique[技术] by (71.8m points)

tfs power tools - TFS 2012 Unshelve to different branch -> An item with the same key has already been added

I need help resolving the following issue:

I am attempting to unshelve code from the source branch onto a target branch.

I am using the following:

  • VS2012 RC
  • TFS 2012
  • VS2012 x64 Cross Tools Command Prompt

When I use the command prompt to perform the unshelve operation, the following occurs:

  1. Shelveset details dialog gets displayed with list of change files.
  2. Click Unshelve button.
  3. Observe command prompt output: "An item with the same key has already been added."

I have downloaded ServicePack1 for power tools. However, I have failed to resolve this issue.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I had the same issue and fixed it when I re-shelved the changeset from the source branch but chose not to preserve pending changes locally. After this the migration of the new shelveset ran smoothly.

(I also made sure I'd followed the below steps collected from other answers on this site)

  • Use a workspace that encompasses both source and target branches
  • Run the command from the folder mapped to the source branch
  • Check for quotes around any paths containing spaces
  • Deleting the cache in C:Users[USERNAME]AppDataLocalMicrosoftTeam Foundation4.0Cache and restarting Visual Studio

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...