.tfignore不工作vs 2017

时间:2018-03-16 09:17:27

标签: tfs visual-studio-2017

我看过很少的网帖和解决方案,但似乎没有用。 我错过了明显的吗? 这就是我所拥有的

在解决方案级别而不是包所在的位置 我有一个像下面的图片文件夹

enter image description here

.tfignore包含以下内容

# Ignore NuGet Packages
    *.nupkg   

    # Ignore the NuGet packages folder in the root of the repository. If needed, prefix 'packages'
    # with additional folder names if it's not in the same folder as .tfignore.   
    packages


    # Omit temporary files
    project.lock.json
    project.assets.json
    *.nuget.props

nuget.config.xml包含

        <?xml version="1.0" encoding="utf-8"?>
        <configuration>
          <solution>
            <add key="disableSourceControlIntegration" value="true" />
          </solution>
        </configuration>

当我尝试在2017年的Visual Studio中签入项目时,它仍会显示所有包裹。

有人可以帮我解决我的错误吗?

感谢

2 个答案:

答案 0 :(得分:5)

根据您的屏幕截图,您没有使用正确的.tfignore文件。此文件没有任何后缀。创建它的一种方法是,建议您使用"tfignore."重命名new.txt文件。它将自动更改为正确的.tfignore文件。

您还可以使用自动生成的.tfignore文件,按照my answer中的以下步骤进行操作。

有关.tfignore文件的详细信息,请参阅此tutorial

注意: .tfignore文件不会影响源控件中已有的文件。您需要先从源代码管理中删除它们。还要确保您的.tfignore文件已在源代码管理中进行了检查。

答案 1 :(得分:0)

  1. 在我看来.tfignore应该直接位于解决方案文件夹中,文件名是.tfignore而不是.tfignore.txt
  2. nuget配置名称是NuGet.config而不是nuget.config.xml
  3. 如果在.tfignore创建之前安装了软件包,那么您可能首先在Source Control资源管理器中“撤消”软件包文件夹。
  4. 就个人而言,我会忽略除目标
  5. 之外的整个nuget packages文件夹