开发者

SourceSafe Error in Visual Studio 2010 - Can't Edit File - File is already checked out by the current user in a different location

SourceSafe Related Error message I got in Visual Studio 2010 when I tried to edit a file:

     File is already checked out by the current user in a different location 

Background:

  • For some reason source safe saved the files 3 directories deep.
  • For Example, The solution files were located in: VS2010Apps\CCP_Utility\CCP_Utility\CCP_Utility\
  • The solution files should be in the root directory: VS2010Apps\CCP_Utility
  • I moved the files to VS2010Apps\CCP_Utility to create this error and now I can't edit my project....

Question:

  • How can I edit my files again an开发者_Go百科d keep the correct directory structure???
  • Do I Just delete the source safe files and re-add it to source safe or what?


It sounds like VSS is expecting those files in a particular directory. To solve this:

  • find and make the path that VSS is expecting; the one with ccp_utility x 3.
  • check-in (all files) to VSS.
  • if you don't care about version history at this point, delete the project from VSS.
  • disconnect/unbind your solution from version control.
  • make the directory layout on disk as you need.
  • drag & drop the root folder of your new layout on disk into VSS Explorer. Suggest make it a brand new path (aside your old project) in VSS, to avoid any complications.
  • you now have a 'new project' as far as VSS is concerned.
  • ensure your bindings are correct, and you should be able to continue as per normal.


This happened to me when my work machine was replaced and I had forgotten to check in some files on my old machine before the change. My local copy of the file was the one I wanted to work with, but VSS had it marked as checked out on a different machine [my old machine].

I just opened the Source Safe Client, browsed to the affected files and checked them in: the client asks if I wish to proceed using the local file (Yes) - then just reloaded the project in Visual Studio.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜