Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get Specific version of a deleted file in TFS

I have this really weird problem with TFS that I can't seem to solve.

About a year ago, I created a file called 'extensions.cs' and placed it in source control, let's say around changeset 1000. At changeset 5000 the file was deleted (as it was no longer needed) and life continued, no problems of course.

Now I need to build an older program from around changeset 3000. It just so happened to use 'extensions.cs' but I can't check that file out at changeset 3000 (or any changeset for that matter) even though it would have existed at that time. I can see the file in the source control explorer, but it is grayed out, and its 'latest' status is listed as 'deleted'

It would seem silly that I would not be able to get it back out, so what I am doing wrong, and how do I solve this problem?

like image 957
A.R. Avatar asked Mar 28 '12 17:03

A.R.


People also ask

How do I get a specific version of TFS?

You can do this by right clicking the solution folder in the Source Control Explorer and selecting Get Specific Version. Here you can select a specific version either by specifying a changeset, label or date.

How do I get a specific changeset in TFS?

Example: getting a specific changeset with TFSUnder Version, in Type select Changeset. Type the changeset number, or click the browse button to display the Find Changesets dialog box, and select the changeset you want. Click Get. The local scripts folder has been updated to the changeset you selected.


1 Answers

Use tf undelete

Or via the UI:

Tools > Options > Source Control > Visual Studio Team Founation Server: Check Show deleted items in the Source Control Explorer. Then select one or more files and Undelete.

undelete

like image 169
KMoraz Avatar answered Oct 12 '22 06:10

KMoraz