To lock files:
- In the Project Explorer, select the file to lock. If you select
a folder, project, or solution, any eligible child items will also be
- Choose Source Control > Lock.
- The dialog will list the files that can be locked.
- In that dialog, you can deselect any files you don't want to lock
and enter an optional comment.
- Click Lock.
Enabling the VCS > Options > Lock Immediately option will bypass the
dialog and immediately lock files without a comment.