Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tfignore not working in VS 2013

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
      • Class1.cs
      • Class2.cs
    • .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.

like image 240
vkom Avatar asked Aug 08 '14 16:08

vkom


3 Answers

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

like image 69
Kristian Avatar answered Oct 23 '22 17:10

Kristian


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.

like image 25
vkom Avatar answered Oct 23 '22 17:10

vkom


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.

like image 42
mac10688 Avatar answered Oct 23 '22 17:10

mac10688