如何防止VS2015 NuGet不能将软件包添加到TFS [英] How to keep VS2015 NuGet from adding packages to TFS

查看:155
本文介绍了如何防止VS2015 NuGet不能将软件包添加到TFS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

VS2013存在一个错误,即即使您不使用.tfignore进行通知,NuGet也会将软件包添加为挂起的更改.有一个解决方法,但是它不适用于VS2015/NuGet3,NuGet又回到了原来的花样.是否有"Nu"解决方法? :-)

VS2013 had a bug where NuGet would add packages as pending changes, even if you told it not to with .tfignore. There was a workaround, but it doesn't work with VS2015/NuGet3, and NuGet is back to its old tricks. Is there a "Nu" workaround? :-)

Microsoft Connect项:尽管有.tfignore,NuGet仍将软件包添加到TFS

Microsoft Connect item: NuGet adds packages to TFS despite .tfignore

推荐答案

3.2 RC版-至少对此版本有效.

It looks like this is fixed in version 3.2 RC of the NuGet Visual Studio 2015 Extension - updating to this version worked for me, at least.

可以在此处找到有关此问题的讨论从NuGet 3.1到3.2 RC.

A discussion about this issue can be found here where it is recommended to update from NuGet 3.1 to 3.2 RC.

更新

扩展的3.2版现已发布(找到

Version 3.2 of the extension has now been released (found here) which includes this fix.

说明

要使其正常工作,您需要做两件事:

To get this working you need two things:

  1. 包含disableSourceControlIntegration设置的nuget.config文件
  2. 尊重disableSourceControlIntegration设置的NuGet Visual Studio 2015扩展版本(从3.2版开始的版本应该可用)
  1. A nuget.config file containing the disableSourceControlIntegration setting
  2. A version of the NuGet Visual Studio 2015 Extension that respects the disableSourceControlIntegration setting (versions from 3.2 onward should work)

NuGet首先从默认位置加载NuGet.config,然后从当前驱动器的根目录开始并在当前目录中结束任何名为NuGet.config的文件.

NuGet first loads NuGet.config from the default location, then loads any file named NuGet.config starting from the root of the current drive and ending in the current directory.

这意味着您可以在<solution><add key="disableSourceControlIntegration" value="true" /></solution> "rel =" nofollow noreferrer>您的用户个人资料的默认配置文件(位于%APPDATA%\NuGet\NuGet.Config)或您的解决方案目录中的NuGet配置文件中,例如\MySolution\.NuGet\NuGet.config.

This means that you can specify <solution><add key="disableSourceControlIntegration" value="true" /></solution> in the default config file for your user profile (found at %APPDATA%\NuGet\NuGet.Config) or in the NuGet config file in your solution directory, e.g., \MySolution\.NuGet\NuGet.config.

这篇关于如何防止VS2015 NuGet不能将软件包添加到TFS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆