locked
"Get Latest" problem RRS feed

  • Question

  • Due to some referencing problems between projects I ended up deleting the entire solution and all source from my machine, this is fine.
    If I go in to VS and to the source explorer it still shows that I have the latest version of all but 3 of the projects that make up my solution, these three projects are greyed out and are shown as "not downloaded".
    If I do a get latest on all the code these three projects are not downloaded, even if I do a force get latest.
    If I double click on the .csproj file it says "The selected file cannot be opened as a solution or a project".
    If I do a force get latest specifically on the files within this project it reports that all files are up to date.
    The three projects are not on my machine and show as unavailable in the solution explorer.
    I have tried learing out the directiory : C:\documents and settings\user\local settings\application data\microsoft\team foundation to no avail.. I thought this held the cache between TFS and the local machine ?

    Any ideas on how I can force TFS to push the code on to my machine or where the cache is, so I can at least delete all code and make sure it gets everything properly.

    Thanks
    Monday, April 6, 2009 10:44 AM

Answers

  • You can indeed clear the cache: http://webapplication02.blogspot.com/2008/07/tfs-cache.html

    The other thing you can do, is to get the specific changeset 1. This is state of Source Control when it was installed. It might help


    Ewald - Please remember to mark the replies as answers if they help.
    • Proposed as answer by mjlarezzo Monday, April 6, 2009 8:54 PM
    • Marked as answer by Hua Chen Monday, April 13, 2009 5:46 AM
    Monday, April 6, 2009 12:22 PM
  • TFS Source Control works with a client-server approach. This means that the server tracks what code each user has in his local workspace. Because of that, if you delete the source from your local workspace manually, the server won't be aware of that deletion and will continue considering that all your files are up to date. This is why when you issue a "get latest" the server doesn''t send anything back; it thinks that all your files are already up to date. This is substantially different to other source control systems like SourceSafe, which are client-only; only the client keeps track of the changes in the files, so if you delete them you're deleting the source control information.

    I think the right way to achieve what you were trying to do, is deleting your local workspace (from file - source control - workspaces, using remove button). This way you're notifying the server that you want to delete your local copy of the source files and lose any pending changes. I think it's the best option because you're trying to recreate the source tree structure without worrying about losing any pending changes you've made. Then you can recreate your local workspace and get latest version, it should work.

    If you don't want to delete your workspace, you should be able to obtain the latest version by usint "Get specific version" and choosing latest version in that window.

    Hope it helps,

    Best regards
    • Proposed as answer by mjlarezzo Monday, April 6, 2009 8:54 PM
    • Marked as answer by Hua Chen Monday, April 13, 2009 5:47 AM
    Monday, April 6, 2009 1:10 PM
  • To force the download of the files use "Get Specific Version" with a "Latest Version" and check the bottom 2 boxes

    I suggest however to change the TFS server's Latest from "Yes" to "Not downloaded". You can do that by running a "Get Specific Version" with a "Changeset" and set the value to "1" then check the bottom 2 boxes.

    From there you can just run a "Get Latest Version"


    NOTE : Dont just delete your local files. TFS does not check your local machine when you perfrom a get. It stores the status of your code on the server. The reason is that it is much much quicker this way. If you want to delete your local files, run "Get Specific Version" with "Changset" and a value of "1" and check both boxes. Then you should use Windows Explorer to remove any leftover files. These files are normally because of building the project, since those files are not in TFS, they wont be deleted.
    mjlarezzo | Measure twice, cut once. Hee Hee. Hey, quit poking me!
    • Proposed as answer by mjlarezzo Monday, April 6, 2009 8:54 PM
    • Marked as answer by Hua Chen Monday, April 13, 2009 5:46 AM
    Monday, April 6, 2009 8:52 PM

All replies

  • You can indeed clear the cache: http://webapplication02.blogspot.com/2008/07/tfs-cache.html

    The other thing you can do, is to get the specific changeset 1. This is state of Source Control when it was installed. It might help


    Ewald - Please remember to mark the replies as answers if they help.
    • Proposed as answer by mjlarezzo Monday, April 6, 2009 8:54 PM
    • Marked as answer by Hua Chen Monday, April 13, 2009 5:46 AM
    Monday, April 6, 2009 12:22 PM
  • TFS Source Control works with a client-server approach. This means that the server tracks what code each user has in his local workspace. Because of that, if you delete the source from your local workspace manually, the server won't be aware of that deletion and will continue considering that all your files are up to date. This is why when you issue a "get latest" the server doesn''t send anything back; it thinks that all your files are already up to date. This is substantially different to other source control systems like SourceSafe, which are client-only; only the client keeps track of the changes in the files, so if you delete them you're deleting the source control information.

    I think the right way to achieve what you were trying to do, is deleting your local workspace (from file - source control - workspaces, using remove button). This way you're notifying the server that you want to delete your local copy of the source files and lose any pending changes. I think it's the best option because you're trying to recreate the source tree structure without worrying about losing any pending changes you've made. Then you can recreate your local workspace and get latest version, it should work.

    If you don't want to delete your workspace, you should be able to obtain the latest version by usint "Get specific version" and choosing latest version in that window.

    Hope it helps,

    Best regards
    • Proposed as answer by mjlarezzo Monday, April 6, 2009 8:54 PM
    • Marked as answer by Hua Chen Monday, April 13, 2009 5:47 AM
    Monday, April 6, 2009 1:10 PM
  • To force the download of the files use "Get Specific Version" with a "Latest Version" and check the bottom 2 boxes

    I suggest however to change the TFS server's Latest from "Yes" to "Not downloaded". You can do that by running a "Get Specific Version" with a "Changeset" and set the value to "1" then check the bottom 2 boxes.

    From there you can just run a "Get Latest Version"


    NOTE : Dont just delete your local files. TFS does not check your local machine when you perfrom a get. It stores the status of your code on the server. The reason is that it is much much quicker this way. If you want to delete your local files, run "Get Specific Version" with "Changset" and a value of "1" and check both boxes. Then you should use Windows Explorer to remove any leftover files. These files are normally because of building the project, since those files are not in TFS, they wont be deleted.
    mjlarezzo | Measure twice, cut once. Hee Hee. Hey, quit poking me!
    • Proposed as answer by mjlarezzo Monday, April 6, 2009 8:54 PM
    • Marked as answer by Hua Chen Monday, April 13, 2009 5:46 AM
    Monday, April 6, 2009 8:52 PM