Visual Studio (VS) 2015.3 does not detect any files added under the folder named 'Release' on Team Projects with Team Foundation Version Control (TFVC) on VSTS
We came across an interesting case where the user was having trouble adding new Visual Studio projects to TF version control.
After adding a new file, it was not being identified as a pending add (The plus sign that we were supposed to see with new add(s) before check in on the Solution Explorer was missing).
This was happening to specific branch by name ‘Release’ created on Source Control
We were able to reproduce this locally, and found that it does not like the Folder created by the name "Release" on Source control.
There was a design change implemented for VS 2015 Update 3 to start honoring .tfignore and default exclusion rules for file adds inside VS. This was requested by numerous customers who are used to using other source control systems (ex: Git’s .gitignore files).
The default exclusion rules include common generated build folders like (bin, obj, Debug, Release, etc). This could cause problems for customers who have used an excluded folder like Release in their folder hierarchy.
We had to do the following to get this to work:
Add a .tfignore file to source control as a peer of the Release folder. If the folder structure is $/Project12192016/Release/, then add the .tfignore file to $/Project12192016.
1. In the Pending Changes page, in the Excluded Changes section, select the "Detected" 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.
Choose OK or Cancel to close the Promote Candidate Changes dialog box.
3. 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.
# Add an inclusion rule to negate the Release exclusion rule. The design of
# .tfignore requires that inclusion rules apply all the way to the last path
# part, so a wildcard is necessary.
# Since the wildcard will cause other exclusion rules to stop working below
# this path, add back any exclusion rules that are needed to ignore things
# like build output.
Hope this helps!
Content: Shruti Sharanappa
Review: Romit Gulati