1
votes

Problem: TFS Build Server (v2013.4) is not honoring the repositoryPath setting in the nuget.config file.

I have nuget auto restore enabled with a custom repository folder. On my local dev PC this works perfectly using Visual Studio 2013.4. I am not using the old auto restore (with nuget targets file, nuget.exe and build directives), instead I am using the new way with Nuget 2.7+. My custom folder "nuget-packages" is excluded from source control with a .tfignore file. All packages get auto downloaded to this folder.

Local folder paths:

c:\ source \ nuget-packages\

c:\ source \ Solution Dir \ .nuget \ nuget.config :

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <solution>
    <add key="disableSourceControlIntegration" value="true" />
     <config>
        <add key="repositoryPath" value="..\..\nuget-packages" />
     </config>
  </solution>  
</configuration>

I can view my TFS build log and I see that the build process is calling nuget restore command, and downloading the packages, but in looking at the build server local source directory, the nuget packages are downloading into the default folder ( \Solution Dir\packages ) so my builds are failing with assembly reference errors.

1

1 Answers

0
votes

It could be this bug. Updating NuGet to 2.8 will fix the issue.