Blog Post

visual studio and TFS tips

Monday, September 7, 2015 2:26 AM

TIP 1 

When working with many projects, use server workspace instead of local one.

TIP 2 

You can configure which kinds of files are ignored by placing text file called .tfignore in the folder where you want rules to apply. The effects of the .tfignore file are recursive.

You can create .tfignore files in sub-folders to override the effects of a .tfignore file in a parent folder.

Create and use a .tfignore file

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

  1. In the Pending Changes page, in the Excluded Changes section, choose the Detected changes link.The Promote Candidate Changes dialog box appears.
  2. Select a file, open its context menu, and choose Ignore this local item, Ignore by extension, Ignore by file name, or Ignore by folder.
  3. Choose OK or Cancel to close the Promote Candidate Changes dialog box.
  4. 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.

 

Example of .tfignore

######################################
# Ignore .cpp files in the ProjA sub-folder and all its subfolders
ProjA\*.cpp

# Ignore .txt files in this folder 
\*.txt
#
# Ignore .xml files in this folder and all its sub-folders
*.xml
#
# Ignore all files in the Temp sub-folder
\Temp
#
# Do not ignore .dll files in this folder nor in any of its sub-folders
!*.dll# source: https://msdn.microsoft.com/en-us/library/ms245454(v=vs.120).aspx

 

Related articles by tags

Advert

Last posts

Advert