tfIgnore does not work for me in Visual Studio 2013

后端 未结 6 1412
南旧
南旧 2020-12-05 22:58

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 artic

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-05 23:42

    I had the same issue. I went and found that there is a bug in the NuGet client:

    Ignore Files

    Note: There is currently a known bug in the NuGet Client that causes the client to still add the packages folder to version control. A workaround is to disable the source control integration. In order to do that, you'll need a nuget.config file in the .nuget folder that is parallel to your solution. If this folder doesn't exist yet, you'll need to create it. In nuget.config, add the following content:

    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:

    Respect .tfignore and .gitignore files for TFS Integration description

    When using TFS integration in Visual Studio, NuGet will pend adds to the /packages folder even when there is a .tfignore or .gitignore file in place that says to ignore the /packages folder. NuGet should respect the ignore file rather than requiring that the user create a NuGet.config file that has disableSourceControlIntegration=true.

    This can be done by calling into the LocalItemExclusionEvaluator: http://msdn.microsoft.com/en-us/library/microsoft.teamfoundation.versioncontrol.client.localitemexclusionevaluator.aspx

    Before adding items to TFS, we should check this evaluator. We should at least do it for the /packages folder if nothing else.

    https://nuget.codeplex.com/workitem/4072

提交回复
热议问题