Why doesn't TFS get latest get the latest?

前端 未结 18 1133
陌清茗
陌清茗 2020-11-30 00:22

Why Why WHY doesn\'t TFS\'s get latest work consistently?

You would have thought that feature would have been tested thoroughly.

What I have to do is, get sp

相关标签:
18条回答
  • 2020-11-30 00:31

    TFS, like some other source control providers, such as Perforce, do this, as the system knows what the last version you successfully got was, so get latest turns into "get changes since x". If you play by its rules and actually check things out before editing them, you don't confuse matters, and "get latest" really does as it says.

    As you've seen, you can force it to reassess everything, which has a much greater bandwidth usage, but behaves closer to how SourceSafe used to.

    0 讨论(0)
  • 2020-11-30 00:33

    Tool: TFS Power Tools

    Source: http://dennymichael.net/2013/03/19/tfs-scorch/

    Command: tfpt scorch /recursive /deletes C:\LocationOfWorkspaceOrFolder

    This will bring up a dialog box that will ask you to Delete or Download a list of files. Select or Unselect the files accordingly and press ok. Appearance in Grid (CheckBox, FileName, FileAction, FilePath)

    Cause: TFS will only compare against items in the workspace. If alterations were made outside of the workspace TFS will be unaware of them.

    Hopefully someone finds this useful. I found this post after deleting a handful of folders in varying locations. Not remembering which folders I deleted excluded the usual Force Get/Replace option I would have used.

    0 讨论(0)
  • 2020-11-30 00:36

    This worked for me:
    1. Exit Visual Studio
    2. Open a command window and navigate to the folder: "%localappdata%\Local\Microsoft\Team Foundation\"
    3. Navigate to the sub folders for every version and delete the sub folder "cache" and its contents
    4. Restart Visual Studio and connect to TFS.
    5. Test the Get Latest Version.

    0 讨论(0)
  • 2020-11-30 00:39

    just want to add TFS MSBuild does not support special characters on folders i.e. "@"

    i had experienced in the past where one of our project folders named as External@Project1

    we created a TFS Build definition to run a custom msbuild file then the workspace folder is not getting any contents at the External@Project1 folder during workspace get latest. It seems that tfs get is failing but does not show any error.

    after some trial and error and renaming the folder to _Project1. voila we got files on the the folder (_Project1).

    0 讨论(0)
  • 2020-11-30 00:40

    TFS redefined what "Get Latest" does. In TFS terms, Get Latest means get the latest version of the files, but ignore the ones that the server thinks is already in your workspace. Which to me and just about everyone else on the planet is wrong.

    See this link: http://blogs.microsoft.co.il/blogs/srlteam/archive/2009/04/13/how-get-latest-version-really-works.aspx

    The only way to get it to do what you want is to Get Specific Version, then check both of the "Overwrite ..." boxes.

    0 讨论(0)
  • 2020-11-30 00:41

    Sometimes Get specific version even checking both checkboxes won't get you the latest file. You've probably made a change to a file, and want to undo those changes by re-getting the latest version. Well... that's what Undo pending changes is for and not the purpose of Get specific version.

    If in doubt:

    • undo pending check in on the file(s)
    • do a compare afterwards to make sure your file matches the expected version
    • run a recursive 'compare' on your whole project afterwards to see what else is different
    • keep an eye on pending changes window and sometimes you may need to check 'take server version' to resolve an incompatible pending change

    And this one's my favorite that I just discovered :

    • keep an eye out in the the Output window for messages such as this :

      Warning - Unable to refresh R:\TFS-PROJECTS\www.example.com\ExampleMVC\Example MVC\Example MVC.csproj because you have a pending edit.

    This critical message appears in the output window. No other notifications! Nothing in pending changes and no other dialog message telling you that the file you just requested explicitly was not retrieved! And yes - you resolve this by just running Undo pending changes and getting the file.

    0 讨论(0)
提交回复
热议问题