Why doesn't my .tfignore file ignore my packages folder

醉酒当歌 提交于 2020-01-13 08:16:24

问题


I am using Visual Studio 2013 Pro and Team Foundation Server 2013. I have a .tfignore file with the following lines:

\packages
\<project name>\Bin
!\<project name>\Bin\*.refresh

Line 1 is not working but lines 2 and 3 are. The project name above is a website inside a solution. There is nothing else in this solution. There are nuget packages installed which automatically pull down when you publish or build the website. When that happens this package folder is created in the solution. It's not added to the solution explorer, it's just in the same folder as the solution when you look at the filer in file explorer.

Please let me know if there is any other information you need.


回答1:


You can control this in NuGet.config.

Make sure the key "disableSourceControlIntegration" exists and is set to "true":

<solution>
    <add key="disableSourceControlIntegration" value="true" />
</solution>

References: http://docs.nuget.org/docs/Reference/Package-Restore http://docs.nuget.org/docs/Reference/NuGet-Config-Settings




回答2:


If your packages are already in TFS, you should first "undo pending changes" on your local, delete them from TFS Source files and then, check in In Visual Studio. That will removed the packages from the server and will not ask to check them in again.



来源:https://stackoverflow.com/questions/27317863/why-doesnt-my-tfignore-file-ignore-my-packages-folder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!