Show Current NuGet values and settings for troubleshooting

Topics: General
Jun 17, 2013 at 3:37 PM
Edited Jun 17, 2013 at 3:42 PM
It would be nice to see what the NuGet.exe command line has got for values, such as, which nuget.config is it going to use, what are the $name$ values going to resolve to. Any values which could be ambiguous or depend on default or relational values that the .exe gleans from the environment or various configuration files.

This could be done through the "nuget help" command or maybe as a new command such as "nuget info" (ala Perforce's p4 info command). It is very helpful for troubleshooting, especially as things get more complicated...

It might even be handier to add this as a switch to each command, say "-Evaluate" or something, where you could enter a "real" command, put the -Evaluate switch on it and it would give the values it would use without actually performing the command, do a "fake" run.

For instance:
nuget pack MyProj.csproj -Prop Configuration=Release -Evaluate
Might return something like the following without creating the package:
    Nuget Config:       C:\Tools\NuGet\NuGet.config
    NuSpec File:        C:\MyProj\MyProjDir\MyProj.nuspec
    Properties:         Configuration=Release
                        id=MyProj.dll
                        title=MyProj
                        description=My description from AssemblyInfo.cs file
                        author=My Company
                        version=1.0.0.0
   Package Created:     MyProj.dll-1.0.0.0.nupkg
   Package Metadata:    id: MyProj.dll
                        version: 1.0.0.0
                        title: MyProj
                        authors: My Company
                        owners: My Company
                        projectUrl: http://myProj.org
                        licenseUrl:http://myProj.org/license
                        iconUrl:NOT SET
                        requireLicenseAcceptance: false
                        description: Hard coded description in the nuspec file
                        releaseNotes: First release
                        copyright: Copyright 2013
                        tags: MyProj My Company
Or something like that. Even getting this level of information from -Verbosity Detailed would be helpful.