CRM 2011 – How to download plugins in the database to a file

[tweetmeme source=”BenHosk” only_single=false]

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


4 thoughts on “CRM 2011 – How to download plugins in the database to a file

  1. Gonzalo October 3, 2011 / 2:03 pm

    In CRM 2011 you can simply include the plugin assembly in a solution and then export the solution. The zip file will contain the dll 🙂


    • Hosk October 3, 2011 / 2:55 pm

      thanks for that piece of information.

      I do vaguely recall seeing plugins in the solution but I never thought to check it.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.