Not able to download all nuget package using solution specific nuget.config

Aryan 41 Reputation points

Hello All,

I'm using "nuget.config" at the same folder level where my visual studio solution file is residing. Getting expected behavior for downloading the nuget package after opening/building the application. Not all nuget packages are getting downloaded from the same nuget package feed, while only two of them are downloaded(below screenshot with red color "checkmark").


The nuget.config file is as below for reference,

 <?xml version="1.0" encoding="utf-8"?>  
        <add key="repositoryPath" value="..\Packages" />  
         <add key="globalPackagesFolder" value="..\Packages" />  
            <clear />  
            <add key="" value="" />  
    		<add key="Microsoft Visual Studio Offline Packages" value="C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\" />  
    		<add key="privateFeed" value="" />  
    		<add key="enabled" value="true" />  
    		<add key="automatic" value="true" />  
    		<add key="All" value="(Aggregate source)" />  

Not sure why only those 2 packages are getting downloaded.

Please help me understand why I'm seeing this behavior and how can I download all the nuget packages from this feed or specific package with version number using "nuget.config" file.

Thanks for your help.

Microsoft Technologies based on the .NET software framework.
3,439 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Aryan 41 Reputation points

    I could solve/workaround for the problem using below steps,

    • Open command prompt and run "dotnet nuget locals all --clear" command to clear cached nuget packages
    • Delete "bin" & "obj" folders for solution
    • Create/modify solution specific "nuget.config" file with nuget package location to download
    • Run "Clean Solution" from VS IDE after opening VS solution
    • Refactor/migrate project specific "packages.config" file to "PackageReference"