TFS Ignoring a New File

Steve Ellwood
1 min readAug 26, 2023

I use Team Foundation Server at work for version control. It has a few nuances that occasionally catch me out and this is one of them. I’d setup a new .Net project and added it into TFS. All seemed fine until I added a new file. The new file was a small batch file that I wanted to run as part of the application but for some reason TFS refused to include it.

The most obvious check in these circumstances was to check the .tfignore file, but mine had nothing relevant. If I deployed the file from Visual Studio or the command line, the file would, unsurprisingly, be there; I tried deleting and readding the file to the solution but TFS still refused to pick it up.

The solution to this is hidden away in Source Control Explorer. If you navigate to the correct folder, you won’t see the file. You need to right click on the folder and select Add Items to Folder …

Selecting the files of interest will then allow them to be committed.

--

--

Steve Ellwood

Senior Integrations Officer at Doncaster Council Any views expressed are entirely my own.