0

How can I configure Team Foundation Build to use a private NuGet feed I have setup with NuGet.Server?

Locally I can add a source with:

nuget.exe sources add -Name "Feed Name" -Source "https://feed.url/nuget/"

How can I achieve this with Team Foundation Build?

drobison
  • 858
  • 1
  • 14
  • 23

2 Answers2

0

You need a NuGet.config file within the solution folder.

Ensure both package sources are added to your NuGet.config file. Also ensure both sources are 'active'.

<configuration>
    <packageSources>
        <add key="nuget.org"
             value="https://www.nuget.org/api/v2/" />
        <add key="example.com"
             value="http://example.com/feed/nuget/" />
    </packageSources>
    <activePackageSource>
        <add key="All"
             value="(Aggregate source)" />
    </activePackageSource>
</configuration>

See NuGet configuration file documentation.

Matt Brooks
  • 1,584
  • 1
  • 14
  • 27
0

Another option that is now available if you use Team Foundation Server is the private hostws NuGet feed they are now trialling.

For more information see this post: http://blogs.msdn.com/b/visualstudioalm/archive/2015/08/27/announcing-package-management-for-vso-tfs.aspx

Quango
  • 12,338
  • 6
  • 48
  • 83