rtaiss

if i open a project, got latest version then deleted a file in my local folder

next i want to delete the file also from the tfs server so that my project on the server doesn t include the file i deleted. how do i do that.

The pb is when i delete the file locally and i do check in, it says, couldn t find the files i deleted

Thank you



Re: Team Foundation Server - General if i open a project, got latest version then deleted a file in my local folder

Ray Chapa

Hi rtaiss, well you first have to do, is select the file from TFS an then right click, there is a command DELETE, when you do that, you have to  check in the file, when you finish that, only pick a refresh for your source control, this file has been deleted.

The first step for delete a files for TFS is delete the file from TFS, then get check in to the delete file, finally refresh your source control, if you delete your file from your phisical folder first, it doesn't been delete from TFS only in your local machine.

I hope this post help you!

 

If you have any doubt, let me know.

 






Re: Team Foundation Server - General if i open a project, got latest version then deleted a file in my local folder

Ray Chapa

I have some doubt here, I read again your post, are your sure this fle exist in TFS before you deleted from TFS, or only you can see it on your local machine because maybe you don't add this file to TFS, and when you been deleted the file you never see it because this flie never exist in TFS. If this file exist on TFS before, you would see it in TFS too, independently you been deleted from your local machine, if this is the case, try with get lastest version from the project, and pick a refresh from them.

If your problem persist, let me know!

 






Re: Team Foundation Server - General if i open a project, got latest version then deleted a file in my local folder

rtaiss

Actually the file existed on both tfs and the local folder. The mistake I made I deleted the file locally. So now i can't check in, it says: Could not find the file.

And I can't get latest version of the file either, it says: Files are up to date, no files were updated

so am I stuck

Thanks





Re: Team Foundation Server - General if i open a project, got latest version then deleted a file in my local folder

Ray Chapa

Maybe the only way for this problem, is to apply undo pending changes, did you try this test with this, but  know that you lost all change that you did to the file.

Ray






Re: Team Foundation Server - General if i open a project, got latest version then deleted a file in my local folder

rtaiss

That worked perfectly Ray. Thank you very much.



Re: Team Foundation Server - General if i open a project, got latest version then deleted a file in my local folder

Ray Chapa

 Great, give like answer!

 

 






Re: Team Foundation Server - General if i open a project, got latest version then deleted a file in my local folder

Tan Phan

To delete a file that is in source control but deleted locally, you can just directly delete the file on the server.

Use command line:

tf delete $/<server path to file>

or

Use Visual Studio:

1. Open Source Control Explorer: View > Other Windows > Source Control Explorer

2. Expand the tree to the folder containing the deleted file

3. If the deleted file is not visible, turn on Show Deleted Items. Tools > Options > Source Control > Visual Studio Team Foundation Server and check Show deleted items. The Source Control Explorer should now show deleted items.

4. Select the deleted file in the file list and click the red X button on the Source Control Explore toolbar. You can also right-click and select Delete.

Hope this helps. -Tan





Re: Team Foundation Server - General if i open a project, got latest version then deleted a file in my local folder

MVP User

You can do "Get Specific Version" with the "Latest" option and the "Force Get" option.

--
Lorenzo Barbieri
MVP Visual Developer - Team System, MCT, MCPD EA Win & Web, MCITP DBA
IT: http://www.geniodelmale.info
EN: http://www.lorenzobarbieri.info

Actually the file existed on both tfs and the local folder. The mistake I made I deleted the file locally. So now i can't check in, it says: Could not find the file.

And I can't get latest version of the file either, it says: Files are up to date, no files were updated

so am I stuck

Thanks