Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

All project Files get read only attribute after download from TFS 2010

I am using Team Foundation Server with VS 2010. I am facing a problem that when i am mapping a new folder to download the code from TFS, after download all the code, all files/folder in new folder get automatically read only attribute and i have to remove this attribute explicitly after it i am able to build the solution other wise it is giving me "Access denied" error. Is there any TFS setting which is making my project files as read only.

like image 514
Tikam Sangwani Avatar asked Feb 15 '23 17:02

Tikam Sangwani


1 Answers

Not with TFS 2010, this is called "Local Workspaces" and is available from TFS 2012 onwards and works like Subversion.

What you are doing, by removing the Read Only flag, is fighting TFS. What you should do is perform a Checkout on the file before editing. If you are using Visual Studio to edit solutions/projects this will happen automatically providing you have your Solution and Project bindings setup. If you are editing files outside of Visual Studio, you can perform a checkout by:

  • Using Source Control Explorer in Visual Studio.
  • Using the Team Foundation Server Power Toys to install a Shell Extension into Windows so you can Right click.
  • Opening the file in Visual Studio and using it as a text editor.
  • Using the tf checkout command line.

By removing the read only flag, you are allowing yourself to edit the file, but not instructing TFS that you have changed it, so TFS won't know to check it in when the time comes. TFS doesn't scan you workspace for changes like Subversion.

like image 98
DaveShaw Avatar answered May 10 '23 17:05

DaveShaw