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 :
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.