Using dotPeek, we can peek into assemblies by downloading symbols or by decompiling them. Out of the box, we can also open NuGet packages stored locally. But what about NuGet packages that we haven’t downloaded yet? Well… there’s a plugin for that!
The plugin is available for download. Extract the ZIP file contents and run the appropriate batch file for your version of dotPeek, e.g. Install-NuPeek.1.0.bat for dotPeek 1.0, or Install-NuPeek.1.1.bat for dotPeek 1.1. The plugin is compatible with dotPeek 1.0 and the dotPeek 1.1 EAP. Source code for this plugin is available on GitHub.
After downloading and installing the plugin, dotPeek features a new toolbar icon as well as two new menu items under the File menu. The File | Open from NuGet… menu entry allows us to download and open a NuGet package from any NuGet repository out there. The File | Open NuGet packages.config… menu entry allows us to open all NuGet packages defined in a packages.config file.
Using the toolbar button, we can search for a NuGet package we want to load and decompile using dotPeek. We can download packages from the official NuGet gallery as well as any other NuGet repository out there such as your TeamCity server.
We can search for packages and open them. Using the Load dependencies checkbox, we can automatically download dependencies for the selected package as well. Once downloaded, dotPeek will display the NuGet package and download symbols or decompile contained assemblies.
In a future blog post, we’ll dive into how we can create plugins for dotPeek. If you can’t wait, the sources for this plugin are available on GitHub. In the meanwhile, download the dotPeek EAP and give it a go!