How to keep VS2015 NuGet from adding packages to TFS

前端 未结 3 584
面向向阳花
面向向阳花 2020-12-07 23:18

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

3条回答
  •  时光说笑
    2020-12-07 23:32

    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.

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

    Update

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

    Clarification

    To get this working you need two things:

    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)

    As indicated in the docs:

    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.

    This means that you can specify 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.

提交回复
热议问题