Check Out and Edit Version-Controlled Items
The following procedures show you how to check out items from Solution Explorer and Source Control Explorer so that you can edit them.
Before you can perform Team Foundation version control operations on your computer, you must create a workspace that can be populated with files from the server. For more information, see Create a Workspace to Work with your Team Project.
Checking out items from a command prompt
You can also check out items from a command prompt by using the Checkout and Edit Commands. The Checkout Command makes a local file in your workspace writable by changing its status. The tf.exe checkout command is immediately processed.
The results of this command are not reflected in the server until you perform a check-in operation. For more information, see Checkin Command.
Using a check-out lock keeps other users from checking in or out any of the specified items until you release the lock. If any other users have locked any of the specified items, the lock operation fails. For more information, see Lock and Unlock Folders or Files.
To perform these procedures, you must have the Check out permission set to Allow. For more information, see Team Foundation Server Permissions.
To check out an item for edit from Source Control Explorer
On the View menu, point to Other Windows, and then click Source Control Explorer.
In Source Control Explorer, select the files that you want to edit.
Right-click the selection, and click Check Out for Edit.
In the Check Out dialog box, select the check boxes for the items that you want to check out.
In the Lock type box, select a locking option.
The Lock type box might be unavailable if someone has exclusively checked out the file or if multiple check-outs are not enabled for the team project. (The ability to check out exclusively is set in the Options dialog box>Source Control>Environment>Editing. The ability to enable and disable multiple check-outs for the team project is in the Team menu>Team Project>Source Control).
Click Check Out.
Solution Explorer replaces the padlock icon with a check mark to indicate that the files are checked out to you.
To check out a file from a command prompt
Click Start, click All Programs, and then point to Microsoft Visual Studio 2010.
Point to Visual Studio Tools, and then click Visual Studio Command Prompt (2010).
Type cd Path, where Path is the location of the directory used to store your personal copy of the files in the server (for example, c:\projects).
Type tf.exe checkout /lock:Checkout FileName, and then press ENTER.
For the full syntax, see Checkout and Edit Commands.