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

后端 未结 8 1631
迷失自我
迷失自我 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:01

    I've scrounged the web with little success, but after fiddling the following will help:

    OK It seems that the package sources configured for NuGet.config is stored per user account, e.g.

    c:\Users\<>\AppData\Roaming\NuGet\NuGet.config

    My issue was harder to resolve, because the build agent was running as a Windows Service under the Local System account. So to get NuGet configuration to for the build, I had to use the following path instead:

    • 64-bit Windows C:\Windows\SysWOW64\config\systemprofile\AppData\Roaming\NuGet\NuGet.Config
    • 32-bit Windows C:\Windows\System32\config\systemprofile\AppData\Roaming\NuGet\NuGet.Config

    You may need to have elevated permissions in order to create the NuGet subfolder and NuGet.Config file.

    Note: I have no solution for using the Local Service account. The above only works for the Local System (or an actual user) account.

提交回复
热议问题