tfs - .tfignore 与 2017 相比不起作用

标签 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>

当我尝试在 Visual Studio 2017 中 checkin 项目时,它仍然显示所有包。

有人可以帮我解决我做错的事情吗?

谢谢

最佳答案

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

您也可以使用自动生成的.tfignore 文件,按照my answer 中的以下步骤操作在这里。

关于.tfignore 文件的更多详细信息请引用tutorial .

注意:这个 .tfignore 文件不会影响那些已经在源代码管理中的文件。您需要先将它们从源代码管理中删除。还要确保您的 .tfignore 文件已 checkin 源代码管理。

关于tfs - .tfignore 与 2017 相比不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49316977/

相关文章:

visual-studio-2013 - 在 TFS 构建期间未找到程序集

tfs - 设置 Team Foundation Server Build 服务以进行自动构建和测试

version-control - 使用小型开发团队实现 Team Foundation Server

.net - msbuild VS2017 解决方案,其中包含 netstandard 库

visual-studio - Visual Studio 不断崩溃 : Application Error

TFS 2013 需要删除卡在服务中的集合

powershell - TFS 2017 vNext Build使用Powershell获得工作空间

msbuild - 如何在 Visual Studio 2017 为我创建的 NuGet 包中包含我的类库旁边的文本文件?

c# - XAML 中的 "The name does not exist in the namespace error"

visual-studio - 英特尔编译器使用错误的 header