Search code examples
nuget

Extracting Nupkg files using command line


Firstly, I do not want to use Visual Studio at all when dealing with the certain .nupkg files.

I know there is a tool called NuGet Package Explorer and this can export nupkg files to a certain file location using a gui, but I'm looking to setup a MSBuild task to run and unpack about 50 .nupkg files, using the command line.

My question is, is there a tool you can use via the command line which will unpack .nupkg files to a specified file location?


Solution

  • You can also use the NuGet command line, by specifying a local host as part of an install. For example if your package is stored in the current directory

    nuget install MyPackage -Source %cd% -OutputDirectory packages
    

    will unpack it into the target directory.