Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatic Checkout with TFS

I recently moved to a new client where the source control system is TFS 2008. I have been using Subversion for almost 4 years so this is quite a change for me. One of the first things I noticed is that every time I try to modify a file Visual Studio (2008) tells me that the file is read-only. I spoke to the guy in charge of TFS and he informed that I need to manually check-out that file before I can modify it. So basically automatic checkouts aren't working for me.

The only advice I have gotten thus far is to enable it in Tools->Options->Source Control->Environment->Prompt for check-out. Which didn't work - it was enabled already. (Plus Visual Studio isn't even prompting me for a check-out - it just tells me the file is write-protected)

Is it possible that TFS is setup to not allow automatic checkouts? (I'm not allowed to touch the TFS setup - we have a whole department for that) Or am I just being blind?

like image 241
Jaco Pretorius Avatar asked Oct 12 '09 13:10

Jaco Pretorius


People also ask

How do I turn off auto checkout in TFS?

In the Options dialog box, click Source Control, and then click Environment. In the Checked In Items section, And in Editing- there are three options available.

What is check in and check out in TFS?

As TFS and your project already have metadata reference/info of your existing files, hence it only checks out the file when you start making any changes or if you explicitly check it out, but it will not check out your project.

What does checkout mean in Visual Studio?

Visual Studio 2019 | Visual Studio 2022 When you want to edit a file, you can open it from Visual Studio Solution Explorer or Source Control Explorer. When you begin editing a file, it's automatically checked out to you.


3 Answers

It sounds like the solution isn't “bound” to the version control provider. From Visual Studio's main File menu, select Source Control, Change Source Control…. You'll see this dialog:

http://alinconstantin.members.winisp.net/webdocs/scc/Bindings1.png

Make sure the the server bindings are correct and that each solution/project is “connected”.

like image 57
Jim Lamb Avatar answered Oct 23 '22 04:10

Jim Lamb


TFS is of course able to automatically check out as soon as you start editing the file.

The option is under Source Control -> Environment -> Checked-in items

You should choose Editing: Check out automatically in the drop-down list.

like image 30
Tor Haugen Avatar answered Oct 23 '22 02:10

Tor Haugen


Probably a strange case, but I found Visual Studio wouldn't do auto-checkout or prompt for checkout on edit if I was trying to edit an ascx or aspx file that had a resx file in the filesystem but not included in the project. It just played the error sound and didn't give any message. Deleting the resx files fixed the problem.

like image 1
Dan Avatar answered Oct 23 '22 03:10

Dan