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
locked.
- Choose Source Control > Lock or press Ctrl+R, L.
- 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.
Note
Enabling the VCS > Options > Lock Immediately option will bypass the
dialog and immediately lock files without a comment.