Question

I placed a file to be accessible by clients for download in my Web API project's App_Data folder. It worked fine on the first couple of tests, but then all of a sudden the server app complained about not having permissions to accept the file.

It turned out that the file had been automatically locked following a checkin of code. How can I prevent this file from being locked again? I simply "checked it out" of TFS, but I don't want to have to continue doing that.

At "checkin time" I can select the file in question and opt to "Exclude" it from the checkin, but it again reverts to being locked after the checkin process has completed.

Is there a way to mark a file or folder as a "no lock zone"?

Was it helpful?

Solution

There's a confusing terminology overload here: the file is marked as read-only on the filesystem. TFS uses the term locked to indicate that the file is checked-out by a given user and cannot be checked-out or checked-in by other users. The file is not locked, but it is read-only.

Team Foundation Server - when you're using a server workspace - marks the files as read-only when they are checked-in to the server and sets then to writable when the files are checked-out.

It sounds like you do not want this file in source control anyway. You should delete these files from source control (but not from your local machine). In the future, you should carefully review your pending changes so you do not add files that you are not interested in having in source control.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top