Sunday, January 17, 2010

Exclude specific files from TFS source control

Last week one of my co-workers was looking for a way to exclude a specific file from TFS source control.

We found the following 2 options:

  1. On a single file level:
    1. Select the file you want to exclude in the Solution Explorer.
    2. Open the File menu, click Source Control and choose the Exclude from Source Control option.
  2. On the folder level: By using cloaking you can hide a specific workspace folder.
    1. On the File menu, click Source Control, and then select Workspaces.

    2. In the Manage Workspaces dialog box, click the workspace you want to apply cloaking to, and then click Edit.

    3. In the Edit Workspaces dialog box, in the Working folders list, either highlight the folder mapping located under Source Control Folder and Local Folder that you want to cloak, or create a new one. Under Status, change the setting from Active to Cloaked.
    4. Click OK to close Edit Workspaces and Close to close Manage Workspaces.

3 comments:

Greg said...

That isn't an option in studio 2010 sp1 with team 2010. I sure would like to remove source control from a folder below the root of the project.

Alaa Telfah said...

Thanks a lot

Anonymous said...

Is is possible to cloak specific file extensions in TFS, so that they don't sync down to my machine even though they exist in the repository?