Examine contents of a nuget package

Windows Users:

As Jonathon Rossi pointed out,

.nupkg files are just ZIP files, so you can have a look at the contents

So on a windows machine, for a temporary fix, just change the file extension from .nupkg to .zip, and then just use Windows' File Explorer to leverage the existing file association for .zip (CompressedFolder) files.

It is possible to "permanently" associate .nupkg with your system's CompressedFolder tool. However, this will corrupt the IconCache.db at the very least, and the typical method to restore it does not work for me (deleting the IconCache.db and rebooting). So I would recommend against associating .nupkg with CompressedFolder if you are concerned with seeing the correct file icon in File Explorer.

With that in mind, if you want a longer term solution for opening .nupkg files without changing their extension...

You can set a file association easily via a command prompt (cmd) like so:

enter image description here

These files will now have the same icon as any other CompressedFolder on your file system, and you can leave their extensions unchanged (as .nupkg).

To undo this association, repeat assoc command for the .nupkg but leave the RHS blank:

enter image description here

You can confirm the current file association at any time by running assoc .nupkg, dropping the equals sign (=).:

enter image description here


.nupkg files are just ZIP files with some metadata, so you can have a look at the contents. The NuGet Package Explorer should make it a little easier to view the contents.

The NuGet Gallery (e.g. https://www.nuget.org/) has a "Download" link on the right hand side, otherwise just install the package into an empty project and then take a peek.

Tags:

Nuget