I have just upgraded to VS2015 and I am experiencing an issue I have not seen before. Using an existing solution under source control, I am able to modify files and they get picked up as pending changes ready to check in to TFS.
However, I add a new file (Test.cs as an example in this screenshot), it is not picked up as a new file.
I am required to right-click it and click "Add files to Source Control"
This has never been an issue before. I would like everything I add as a new file to be picked up as a pending change. How can I make this happen? I have not seen this before in previous Visual Studio versions.
I can confirm that this issue is the same on another machine. Also, the new file is not picked up in "Promote Candidate Changes" either.
If I then click "Add file to Source Control", I get this message.
"The selected file is ignored. Add it to source control anyway?"
My .tfignore file just has a directive to ignore packages, so I don't think this file is the problem.
How can I get my settings back on track?
UPDATE:
I have noticed that this only happens to the "Release" branch of my workspace. All other branches behave as expected. Furthermore, if I then take a branch "Release" and call it "Release1", the issue goes away entirely!
Do branches with the specific name "Release" take on any special functionality in TFS?
In Visual Studio, choose File, Open, Project/Solution, and then use the Open Project dialog box to open the solution. In Solution Explorer (Keyboard: Ctrl + Alt + L), select the solution, open its context menu, and then choose Add Solution to Source Control.
If you go into Source Control Explorer and navigate to your project you should see that LibraryTests isn't included. Right click on the folder, click on "Add items to folder..." then click on your project folder thats missing. Click next and this should add it to source control.
In Solution Explorer, the Pending Changes Window, or Source Control Explorer, select one or more items, open their context menu and choose Undo or Undo Pending Changes. To undo all changes you have made in your solution or a code project, open the context menu, and then choose Undo Pending Change.
When you try to add ignored files using the Add to Source Control dialog box (for example by dragging them into Source Control Explorer), they automatically appear in the Excluded items tab. You can configure which kinds of files are ignored by placing text file called .
Folders called Release and their contents is automatically excluded from TFS (along with Debug and lots of file types). You can override this for particular folders by creating a .tfignore file, as detailed in the "Customize which files are ignored by version control" section of this link
Customize which files are ignored by version control
By default certain types of files (for example, .dll files) are ignored by version control. As a result:
When you add ignored files to folders that are mapped in a local workspace, they do not appear in the Pending Changes page in Team Explorer.
When you try to add ignored files using the Add to Source Control dialog box (for example by dragging them into Source Control Explorer), they automatically appear in the Excluded items tab.
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. However, you can create .tfignore files in sub-folders to override the effects of a .tfignore file in a parent folder.
.tfignore file rules
The following rules apply to a .tfignore file:
# begins a comment line
The * and ? wildcards are supported.
A filespec is recursive unless prefixed by the \ character.
! negates a filespec (files that match the pattern are not ignored)
.tfignore file example
Ignore .cpp files in the ProjA sub-folder and all its subfolders
ProjA*.cppIgnore .txt files in this folder
*.txtIgnore .xml files in this folder and all its sub-folders
*.xmlIgnore all files in the Temp sub-folder
\TempDo not ignore .dll files in this folder nor in any of its sub-folders
!*.dll
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With