I am pulling my hair out with trying to get tfIgnore
to work in Visual Studio 2013
.
I followed the instructions here: bottom of this article and excluded my packages file like this:
\folderA\folderB\packages
The path looks fine and is what Visual Studio generated for me. I have checked the file in to the place where Visual Studio generated it and tried rebuilding but the packages all still appear in my included changes
folder in pending changes.
I've tried all sorts of other combinations of file locations and filespec commands but it never seems to do anything.
Am I missing something obvious?
Thanks
In pending changes, right click the root package folder -> click undo. You should see your changes move to the "Detected changes" dialog box, under excluded changes (the window where you can promote files into source control).
Now, open up .tfignore and simply add
packages
. You should see that now, when you open detected changes, your packages aren't displayed.If the file or folder(s) you want to ignore changes to are checked-in to TFS, then ignoring them in .tfignore won't do anything - you have to remove them from source control first. That way any changes to them will be ignored.
A bug in NuGet may be causing the problem. This is the workaround:
Create a
.nuget
folder in your solution folder, if it doesn't exist.In the
.nuget
folder, create a filenuget.config
with this content:Looks like someone called "aheidebrecht" is trying to provide a NuGet package to keep NuGet packages from checking into TFS. Seems a bit perverted...
In package manager console run...
https://www.nuget.org/packages/DisableSourceControlIntegration-TFS
I noticed that if you have one file checked in the packages folder, for example repositories.config then the .tfignore pattern doesn't work.
My solution was to delete the packages folder from source control entirely, then the packages content were successfully ignored
I had the same issue. I went and found that there is a bug in the NuGet client:
http://docs.nuget.org/consume/package-restore/team-build
And I was able to get it working by following the work around linked in the "Ignore Files" section above. Here is a snippet of the work around below:
https://nuget.codeplex.com/workitem/4072