Is there a way to make NuGet Package Source settings per solution?

后端 未结 2 485
广开言路
广开言路 2021-01-29 20:13

Does anyone know of a way to make Visual Studio apply the NuGet package sources configuration per solution instead of across all solutions? I keep having versioning problems be

2条回答
  •  故里飘歌
    2021-01-29 20:40

    I want to add to the excellent answer provided by BenAlabaster. I had somewhat the opposite problem:

    The company globally configured their custom private nuget feed for use on all solutions by default, and I wanted to make a "prototype" app using the public nuget feed.

    With this (in the directory of that solution), the public nuget feed is available to my specific solution only, while keeping the company's feed the default for all other solutions:

    
    
      
        
        
        
        
      
      
        
        
      
      
        
      
      
        
        
      
    
    

    The key was to clear all upwards disabled feeds, since they deliberately disabled the public feed in their NuGet.config in %APPDATA%\NuGet.

提交回复
热议问题