I'm using Visual studio 2013 with TFS 2013. I've been trying to get all files in a folder to not checkin using .tfignore and with hours of searching and trying different solutions with no luck. I followed the instructions http://msdn.microsoft.com/en-us/library/vstudio/ms245454.aspx and could not get it to work. Any help is appreciated.
My project structure looks something along the lines of:
- project
- Controls
- TestIgnore
- .tfignore
and my .tfignore has 1 line of code:
\TestIgnore
My workspace is set to local.
When I make changes to Class1.cs, when I check in, Class1.cs is in the pending check in list which I believe it should not.
I was very frustrated with this, and nothing seemed to work despite having the .tfignore file in the same folder as the solution, and deleting the packages folder (which I'm trying to get TFS to ignore) After building, nuget would restore the packages and the packages would show up in the pending changes window.
But on a whim, and remembering some vague comment I saw somewhere, I right-clicked on the solution in the solution explorer, and chose "Enable Nuget package restore" - which adds a .nuget folder to the solution, and lo and behold, suddenly the packages folder WAS ignored when checking in the solution to TFS.
I exited VS2013, deleted the packages folder, opened the solution again, selected "Rebuild solution" and the packages were restored, but nothing shows in the pending changes window. Success at last!
Upon further investigation, it appears it's the nuget.config file and the setting "disableSourceControlIntegration=true" which is necessary as seen in http://nuget.codeplex.com/workitem/4072
I asked the same question on msdn and got a reply saying it seems to be a bug in VS 2013 for not supporting tfignore. I submitted a bug on msdn as well and well close this question. Hopefully it will get fixed soon.
tfIgnore does not work for me in Visual Studio 2013
Edward Wilde's answer fixed it for me. I had to delete the already checked in packages on the source control itself. Then tfs would ignore the changes.
I had a similar issue where TFS was preventing me to checking a .tfignore
file placed 2 folders down from the Project root.
I got it to work ONLY when the .tfignore
file was placed on the project's root folder. (.tfignore file placed side by side to "Main" folder).
In this way, TFS let me checkin my .tfignore
file.