Enhancements to NuGet Command line tool for hierarchy .configs

Topics: General
Dec 28, 2012 at 12:56 PM

I have been working with the newer NuGet feature of having hierarchy based Nuget.config files.  But I have found that in a large TFS solution with many projects/varying folder depths it can get confusing where NuGet is getting its config information from.

For example there is the NuGet.config in the default %appdata% directory, another could be located at our project root level in source control and in some cases when package restore is enabled one in the project or sln folder. 

I was wondering if we could have a command "nuget -fileLocation" similar to the nuget -sources that would list the file locations of the nuget.config that are being evaluated. 

It would also be cool if we could supply a switch "nuget -displayConfig" that would display the final xml of the nuget.config whcih would be applied at any particular level.  SO if I run this command at my project level it owuld display the consolidated config from my project and %appdata%.  If I ran it from my solution folder it would display the consolidated config from all 3 locations.

Dec 28, 2012 at 4:55 PM

NuGet doesn't recognize config file at project level. It only recognize config file at the solution root or under <solution root>\.nuget.

Dec 28, 2012 at 6:00 PM

I am referring to the "Hierarchical Nuget.config" feature that was added in v2.1 Nuget: http://docs.nuget.org/docs/release-notes/nuget-2.1

Depending on where you run the Nuget.exe from you get different final config files at runtime