Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deleted a file out side Visual Studio, TFS doesn't recognize it

Tags:

tfs

I am new to TFS. I checked out a folder from TFS using Visual Studio and then deleted bunch of files/added couple of files within that folder using windows explorer (actually I didn't do it, but that folder has third party libraries and I used an installer which made all these changes).

Now if I go to Visual Studio and try to check in that folder, I am getting this error:

Check in: Operation not performed

Could not find file : /ThirdPartyFolder/aDeletedFile.aspx

I tried to follow the solution proposed in this post, but that didn't work out: http://www.woodwardweb.com/tfs_top_tip/tfs_top_tip_11.html

When I do 'Get Specific Version' and specified 'change set 1', it doesn't show the deleted files in red as it does in the screenshot of that blog post. Also, when I click OK, it shows the Pending Changes-Conflicts window with all the files that got deleted. Even though I selected "Keep Local Version", when I try to check in, I am getting the same error again.

Is there a way in TFS to take what is in my local version and over write what is in the server with my local version files?

I have done similar operations using Subversion, and this has never been a problem. Hopefully someone will let me know how to achieve this in TFS.

like image 938
kthiagar Avatar asked Aug 19 '11 22:08

kthiagar


People also ask

How do I permanently delete a file in TFS?

Use the tf destroy command to destroy, or permanently delete, version-controlled files from Team Foundation version control. The destroy action cannot be reversed. You must not destroy files that are still needed.

Where do Visual Studio deleted files go?

Deleted files in visual studio should end up in the recycle bin if you have it enabled. If it has not been cleared out, you can restore it.

How do I recover a deleted file in Visual Studio?

First go to Recycle Bin of your local machine. Your VS code deleted files is there in Recycle Bin. So, Right click on deleted files and select-> Restore option then your deleted files will be automatically restored in your VS code.


1 Answers

Team Foundation Server requires that you explicitly pend changes for these files - if you delete a file locally, this does not explicitly pend a delete against Team Foundation Server. This is actually a useful feature - the server optimizes the data it sends you based on its knowledge of your local filesystem. That is to say, if you say "get latest", it knows your current versions and will only deliver the changes. If you're working with very large projects, this can be very efficient.

However, when other programs decide to make changes without pending the changes to the server, things can get a bit confused. Fortunately, TFS has the ability to detect changes that were made outside without explicitly pending those changes. You can use the "return online" capabilities of your TFS client.

You'll need the Team Foundation Server Power Tools installed, then you can simply run: tfpt online to detect those changes and select which ones to pend to the server.

like image 139
Edward Thomson Avatar answered Oct 10 '22 15:10

Edward Thomson