Sunday, March 5, 2017

Restore nuget Packages in VSTS


  1. Create a nuget.config file(It contains the package source : nuget.org and cutsom package source) as part of the solution


<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <!-- remove any machine-wide sources with <clear/> -->
    <clear />
    <!-- add a Team Services feed -->
    <add key="Key" value="TFSUrl/_packaging/Application/nuget/v3/index.json" />
    <!-- also get packages from the NuGet Gallery -->
    <add key="nuget.org" value="https://www.nuget.org/api/v2/" />
  </packageSources>
  <activePackageSource>
    <add key="All" value="(Aggregate source)" />
  </activePackageSource>
</configuration>


2 Add the path of the nuget.config to the nuget restore task in VSTS as shown below


No comments:

Post a Comment