What happened to “Exclude from Source Control” in VS2012

后端 未结 6 1958
自闭症患者
自闭症患者 2021-02-19 04:35

I want to exclude some of the files in code folders from TFS 2012 source control.

Before VS2012 this was done by the \"Exclude from source control\" command available in

相关标签:
6条回答
  • 2021-02-19 04:57

    It's in the Pending Changes pane separated to Excluded Changes and Included Changes sections. It allows filtering and excluding or promoting items between sections.

    !Excluded Changes

    0 讨论(0)
  • 2021-02-19 05:01

    I have Visual Studio 2017 Enterprise, and the option to exclude does not exist under File->Source Control. My solution to this problem was to open the Source Control Explorer, and remove the item I wanted to exclude.

    0 讨论(0)
  • 2021-02-19 05:04

    When you click on "Detected Changes" in the Team Explorer pane, "Promote Candidate Changes" window opens. This window allows you to select among detected changes and promote them to a source controlled item.

    In this "Promote Candidate Changes" window, you select a file (or multi select files with Shift), right-click on it and a context menu pops up which contains an "ignore this local item" option. If you you click on it, selected files are excluded from source control.

    Visual Studio adds a file named ".tfignore" to the source control mapping root, which contains names of all files to be ignored by source control. (Previous TFS versions did not produce this file but they were all server workspaces. Since this is a "Local" workspace, filenames to be ignores need to be kept in the workspace)

    0 讨论(0)
  • 2021-02-19 05:07

    In VS2013 this is back but has been moved to the file menu: -

    • Select the file in the Solution Explorer
    • File > Source Control > Advanced > Exclude xxx.xxx from Source Control

    I know that this is slightly off topic but thought it may help someone.

    0 讨论(0)
  • 2021-02-19 05:17

    This is the easiest solution:

    1. Select the file(s) in Solution Explorer

    2. Go to File -> Source Control -> Advanced

    Path To Exclude

    and here it is

    Here is the Exclude

    Keep in mind: If you right click a file in Solution Explorer you only find "the most important options" not all :)

    0 讨论(0)
  • 2021-02-19 05:21

    I have the real solution.

    In the "team explorer" pane, in the "pending changes" tab, right click a new file you don't want in source control, and click "undo".

    It will leave the file in the project, and exclude it from TFS. In the project window, the file will never have a "lock" icon on the left of its name.

    0 讨论(0)
提交回复
热议问题