TFS2012 build server not restoring NuGet packages from in-house repository

前端 未结 2 825
别跟我提以往
别跟我提以往 2020-12-14 04:19

I\'ve set up an in-house NuGet repository (a shared folder on one of our servers), and have added it to the \"Available Sources\" list in the Visual Studio NuGet settings on

2条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-14 04:38

    You can add the source to a machine-wide config on the TFS build server and it will be included in the list of sources when doing package restores.

    What I did was create a file %ProgramData%\NuGet\Config\sources.config that contained:

    
    
      
        
      
    
    

    The name of the file doesn't matter, it's the location of the file. Nuget picks up any .config files under that folder.

    http://docs.nuget.org/docs/reference/NuGet-Config-File#NuGet_config_extensibility_point

    UPDATE 2016-11-18 According to http://blog.nuget.org/20161121/introducing-nuget4.0.html (under breaking changes), VS 2017+ and NuGet 4.0+ changes the location of the machine-wide config folder to %ProgramFiles(x86)%\NuGet\Config\.

提交回复
热议问题