How do I permanently exclude the bin and obj folders from TFS 2012 checkin?

北城余情 提交于 2019-11-28 08:05:22

TFS 2012 has the option to drop a .tfIgnore file in your workspace.

Visual studio has a UI to create the file for you:

While you can manually create a .tfignore text file using the above rules, you can also automatically generate one when the Pending Changes page has detected a change.

To automatically generate a .tfignore file

  • In the Pending Changes page, in the Excluded Changes section, choose the Detected changes link.
  • The Promote Candidate Changes dialogue box appears.
  • Select a file, open its context menu, and choose Ignore this local item, Ignore by extension, or Ignore by file name.

  • Choose OK or Cancel to close the Promote Candidate Changes dialog box.

  • A .tfignore file appears in the Included Changes section of the Pending Changes page. You can open this file and modify it to meet your needs.
  • The .tfignore file is automatically added as an included pending change so that the rules you have created will apply to each team member who gets the file.

Or create it from the command line using echo . > .tfIgnore and then open it using notepad.

Another trick is to name the file .tfIgnore. in explorer and save it. You'll probably be prompted if you want to change the extension, the answer, in this case, is: yes.

For Excluding Bin folders ,Tick "Show Solution Changes" Under View options in "Included Changes"

I called in the help of our TFS admin.

We couldn't make a .tfignore file, but what did work was the following:

  1. Check in both folders in TFS;
  2. Delete the dlls and pdbs which are unique to the project from the source control explorer and check in this change.
  3. Rebuild the project locally, try to check in and confirm that there are no pending changes.

the dependent assemblies remain in TFS, but since these rarely change, this isn't a big issue.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!