I recently had the problem where I needed to see what plugin or the code in a plugin to see if it was different from the latest code I had on my machine.

When you have to pick up projects which other people have worked on, it can be difficult to know what code is deployed and if its the same code which is checked into your source repository.

I tried googling the problem and it brought back a few different solutions to the problem

This blog post adjusted the plugin registration tool to add a download button.  I tried this one but the code he displayed on the screen didn’t quite seem to compile but this could easily have been me not doing it correctly.  When I did get the code to compile it then failed when loading up the dll.

This blog post converted the encoded base 64 string representation of the plugin from PluginAssemblyBase table to a file and then used a decompiler to view it.  I have to admit I didn’t get this to work either.

finally I remember doing something similar on CRM 4 using a tool Mitch Milam wrote.  You can read about that and why it’s useful in this blog post.

I thought if the code worked for CRM 4 then there is no reason it shouldn’t work for CRM 2011 because I think the dll’s are probably loaded into the same table, in fact I’m pretty sure of that because other wise it would make converting databases a bit more tricky.

So you can download the tool from Mitch’s blog here

Follow the instructions and it will download the dll for you.

The I used ILSPY to decompile the dll and view the code, you can find ILSPY here

of course after doing all that, I found the code was exactly the same as the code checked into source control


Filed under: CRM 2011, plugins