我看过很少的网络帖子和解决方案,但似乎不起作用。 我错过了显而易见的事情吗? 这就是我所拥有的
在解决方案级别,而不是包所在的位置 我有一个如下图所示的文件夹
.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/