How to get TFS2015 Build (Build.vnext) and NuGet package restore to use custom package sources

后端 未结 8 1582
迷失自我
迷失自我 2020-11-30 07:52

I\'m trying to get our TFS2015 Build (TFSBuild vnext) going along with VS Team Services.

Thus far most blogs and documentation has been helpful, except for when try

相关标签:
8条回答
  • 2020-11-30 08:25

    In the RTM of Team Foundation Server 2015 you have to add a build step of the type "NuGet Installer", and restore the packages of the Solution file before you run the actual build process. In this task you can pass the argument -ConfigFile path/to/nuget.config which contains your repository path.

    For Example:

    <configuration>
      <packageSources>
        <add key="Internal Nuget" value="\\srv-nuget\Repo" />
      </packageSources>
    </configuration>
    

    0 讨论(0)
  • 2020-11-30 08:27

    Alternatively you could also add a NuGet Installer build step before the Visual Studio Build step in your build configuration to restore all NuGet packages.

    There you can pass the location of your private repo as argument to nuget.exe:

    -source "https://www.nuget.org/api/v2/;http://mynugetserver"

    0 讨论(0)
提交回复
热议问题