Microsoft Dynamics CRM 2011

Microsoft Dynamics CRM 2011

Sunday, August 18, 2013

Step-By-Step How to deploy a Plugin in CRM 2011

by Carmel Schvartzman
  1. In this walkthrough we will explain how to deploy a plug-in in the CRM server:
  2. First, copy the DLL containing the plug-in to the server directory:  this have to be the following : C:\Program Files\Microsoft Dynamics CRM\Server\bin\assembly
  3. Next, because we'll be using the Plugin Registration Tool that comes with the CRM 2011 SDK, copy that GUI to some directory at the CRM server:000I copied the app to the C:\Plugintool directory.
  4. Double click the PluginRegistration tool:1
  5. Now, press CONNECT to discover your CRM webservice:2If your CRM server hosts more than one Organization, select the one to wich you developed your plug-in
  6. Check that the selected CRMService URL is the one you want to deploy your plug-in
  7. Now press "REGISTER" and next "REGISTER NEW ASSEMBLY":4 
Now select the assembly you want to deploy:
6
It's strongly recommended that you set up the ISOLATION MODE to "SANDBOX": the SANDBOX feature gets code executed in an isolated and trusted environment. In the case your plug-in consumes too much server resources, SANDBOX mode will remove it from the event pipeline where you registered  your code. Also, the same will be done in case of continuous failing.
IMPORTANT: the assembly can be stored in the DISK or in the DATABASE. At the development stage, it's recommended you store it at the DISK, because there you can also copy the .PDB file used for debugging purposes. Later, when you finished testing your code, YOU MUST DEPLOY IT TO THE DATABASE!! Why? Some reasons are:
  • The assemblies registered on database can be included in a solution hosted in sandbox or in CRM ONLINE.
  • If your CRM server is load balancing, storing the DLLs in DATABASE will allow CRM to automize the process of updating and deploying changes.
  •  There's no need to restart the CRM servicesmaking IISRESET on the applicationpool because the update of an assembly will take effect automatically after you press the UPDATE button.7So instead of selecting "DATABASE" select the option "DISK" for now.
 That's all
Happy programming    :-)

כתב: כרמל שוורצמן

No comments:

Post a Comment