Retrieving the plugin dlls from MS CRM Dynamics Database

There might be instances where you would need to extract the ‘Plugin Dlls of MS CRM’.

Normally, in MS CRM Dynamics, the plugin is stored in the column ‘content’ as Base64 encoded string inside the table “PluginAssemblyBase”

Plugins with sourcetype 1 are stored in the database. Others would be stored in the disk.

So how do we retrieve these Dlls and then view the source code?

After searching a lot , I landed up initially here. This method somehow did not reap me any benefit . I was still on square 1.

Later this post too can give you valuable insights.

But what really WORKED FOR ME at the end was Mitch Milam’s tool which would extract the plugins as dlls and save it on the disk.

Download the tool here.

Usage is straight forward.

CRMExtractPlugins [serverurl] [organizationName] /L

Go to command prompt where you have extracted the above tool’s exe file.

On the command prompt , RUN,

>CRMExtractPlugins  “http://crmserver” “org name”

It uses the security credentials of the currently logged-in user so you must be a CRM system administrator for it to work properly.

If the credentials are fine, the dlls would be written to the folder where the tool is extracted.

the /L parameter will extract just the names of the plugins within the system and place them into a file called [organizationName]-plugins.txt which can be found inside the folder that is created by the export process.

A screenshot of the command prompt is as below, for your reference :

Retrieve Plugins from MS CRM database

Retrieve Plugins from MS CRM database using the tool.

 

 

 

 

 

Once the dlls are successfully retrieved , you could use a .Net Reflector tool . The most common one used to be that of RedGate. This one now is no more free and you get a 30 days trial period. A free one which started recently is ILSpy.

Whichever tool you may use, it would be possible for you to “Export Assembly Source Code” , to a folder of your choice , and then take it up from there.

Hope it helps.

Advertisements

About mytechlifedays

Its been a wonderful learning period over the last 6 years in the IT industry , getting exposed to whole lot of technologies and ideas. The hurdles and the crisis that came along have been wonderful experience ... And now its time to pen them down so that let some others execute faster and easily with these information .....
This entry was posted in MS CRM and tagged , , , , . Bookmark the permalink.

Leave a Reply ! It would be always appreciated ! :)

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s