Reputation: 7804
Whenever I Get Latest
from TFS 2012 in Visual Studio. It doesn't really get latest. what it does is update the solution file so that new stuff added by my team mates shows up with a warning mark on in so say that its not there.
FFS DIDN'T I JUST ASK TFS TO GET IT FOR ME!
Apparently TFS overcomplicates life by deciding based on some strange rules that I don't know what I am asking for and will give me what it thinks is right.
As far as I am concerned if the file has been modified since I last got it from the server GET IT! IT HAS CHANGED. Why would the source
Anyway I am wondering if there is a way to add a context menu command that will fire a Get Specific Version
of the latest checkin?
It would save me a few failed builds and clicks and just generally being irritated by the Source Control System in TFS.
Upvotes: 4
Views: 8488
Reputation: 1
In TFS 2012, right click the project name, hover over "Advanced", and click "Get Specific Version..."
This answer is a bit belated, but to Peter, the commands are not the same. One is "Get Latest Version" and the other is "Get Specific Version...".
The real issue here is "Get Latest Version" does not get the latest version (odd, but true).
From a software engineering perspective, the "why" is easy. A project leader examined the requirements, analysis, code, and tests of these two menu options and said, "Okay!".
This is equally difficult to understand. Who was this person? The good news is that we can learn from other's mistakes or other's incomprehensible mistakes.
Upvotes: -2
Reputation: 308
the option is built in here : rightclick -> advanced -> get specific version
curtesy of http://hamidshahid.blogspot.co.uk/2012/12/get-specific-version-in-visual-studio.html
Upvotes: 0
Reputation: 2470
I know this question has passed it's sell by date. But getting specific latest MOSTLY resolves the issues here on this end.
You should Righ Click your sln File
Go To SourceControl
Click Get Specific Version
Make sure you select the two check boxes
for Overwriting everything.
Upvotes: -1
Reputation: 78783
When you select Get Latest on the solution, it will get the latest of the solution. It won't get new items that were added to the solution on the server.
Instead, open Source Control Explorer and execute a Get Latest on the folder containing the solution. This will get everything, the solution file, new files, etc.
As to why this is the case, I can only speculate: Visual Studio solutions don't enforce a strict filesystem layout and one can place items anywhere in my filesystem into a solution. So when you select Get Latest on a solution, the TFS provider will identify each item in your solution that is also in TFS and execute a Get Latest on those paths. By doing this, new items would be excluded (because their paths were not specified in the get.)
New items would be included if you were to do a Get Latest on the paths themselves or the folder that contains them, however you can't know where these new items are until you've already done a get of the solution file.
So, if your solutions are set up such that all items are contained in some single directory (most, of course, are) then it's easiest just to use Get Latest from the Source Control Explorer.
Upvotes: 8