- I try it myself
- Check out what others have done
I'm currently learning how to create my own NuGet packages so I'm trying to do a lot of things on my own, but I would also like to see how existing packages are made.
After installing a NuGet package in your project you can go in the packages folder and unzip the .nupkg file (yes, it's only a zip file with a different extension). Fortunately, there is an easier. NuGet Package Explorer is an open source tool available on CodePlex.
With it you can load a package from the official NuGet feed or any other feeds you want even local feeds.
Then when we open a package we can explore its content and even go inside individual files
NuGet Package Explorer also allow us to edit files and the package itself if we want.
One trick I like to do is to add my local NuGet package download cache as a feed. To do that in the Tools menu select View NuGet download cache.
This is the folder where all the packages you previously downloaded are cached (from Visual Studio, NuGet Package Explorer and any other NuGet based tools). Simply copy the path and paste it in the Package Source field like this
This way I can quickly get to a package I just installed in my solution.
NuGet Package Explorer is a powerful tool I use a lot to understand how NuGet packages are made.
I hope it will help you too.