locked
What is "Type of location" during Plugin deployment? RRS feed

  • Question

  • Hi All,

    I am not clear about the "type of loction" option during plugin deployment using plugin registration tool. The 3 options are Database, Disk and GAC. Can any one explain the advantage of each type over other. Which should be used in which situation.

     

    Thanks,

    Laxmikant D.

    Friday, February 11, 2011 2:46 AM

Answers

  • Database: The assembly dll is stored in the database, rather than the file system. The major advantages are that the assembly need only be deployed once if you have mulitple CRM servers, and that no additional action is required to restore / redeploy the assembly either during disaster recovery, or if redploying to an alternate server. This is the preferred option in a production environment

    Disk: The assembly dll is placed in the <CRM folder>\server\bin\assembly directory on each server. You have to ensure the dll is placed in the correct place on all CRM servers, so the deployment overhead is a little greater. I normally use this option in development environments as you can redeploy newer versions solely by file transfer, rather than reregistering. Also, if debugging, the assembly .pdb file needs to be placed in the same location; with this option it's easy to ensure the dll and pdb are from the same build

    GAC: The assembly is placed in the Global Assembly Cache on each CRM server, and again you will have to do this. The GAC does allow multiple versions of an assembly, but CRM doesn't, so you don't really gain anything by usng the GAC. I don't think I've ever used this option

    There is one further consideration. If your plugin assembly has other dependent assemblies, then you can place this dependent assembly in the GAC whichever of the above options you take. However, if you use the Disk option, then the dependent assemblies can also be deployed into the \server\bin\assembly directory


    Microsoft CRM MVP - http://mscrmuk.blogspot.com  http://www.excitation.co.uk
    • Proposed as answer by Khaja Mohiddin Friday, February 11, 2011 11:01 AM
    • Marked as answer by Jim Glass Jr Friday, February 11, 2011 3:45 PM
    Friday, February 11, 2011 9:56 AM
    Moderator

All replies

  • Database: The assembly dll is stored in the database, rather than the file system. The major advantages are that the assembly need only be deployed once if you have mulitple CRM servers, and that no additional action is required to restore / redeploy the assembly either during disaster recovery, or if redploying to an alternate server. This is the preferred option in a production environment

    Disk: The assembly dll is placed in the <CRM folder>\server\bin\assembly directory on each server. You have to ensure the dll is placed in the correct place on all CRM servers, so the deployment overhead is a little greater. I normally use this option in development environments as you can redeploy newer versions solely by file transfer, rather than reregistering. Also, if debugging, the assembly .pdb file needs to be placed in the same location; with this option it's easy to ensure the dll and pdb are from the same build

    GAC: The assembly is placed in the Global Assembly Cache on each CRM server, and again you will have to do this. The GAC does allow multiple versions of an assembly, but CRM doesn't, so you don't really gain anything by usng the GAC. I don't think I've ever used this option

    There is one further consideration. If your plugin assembly has other dependent assemblies, then you can place this dependent assembly in the GAC whichever of the above options you take. However, if you use the Disk option, then the dependent assemblies can also be deployed into the \server\bin\assembly directory


    Microsoft CRM MVP - http://mscrmuk.blogspot.com  http://www.excitation.co.uk
    • Proposed as answer by Khaja Mohiddin Friday, February 11, 2011 11:01 AM
    • Marked as answer by Jim Glass Jr Friday, February 11, 2011 3:45 PM
    Friday, February 11, 2011 9:56 AM
    Moderator
  • @david

    Database: The assembly dll is stored in the database, rather than the file system. The major advantages are that the assembly need only be deployed once if you have mulitple CRM servers, and that no additional action is required to restore / redeploy the assembly either during disaster recovery, or if redploying to an alternate server. This is the preferred option in a production environment

     

    if i choose the assembly to be in database, if my solution is accessed by 1000 licensed users(sales) and

    say plugin is enables for all sales persons and for the entity lead.

    then plugin will access the assembly from database for every instance of the event and

    for 1000 users then 1000 times we access database,hope its a performance issue.

     

    i have seen plugin registration tool shows location for assembly database as default,is it prescribed?  

    kindly revert this.

    thanks in advance


    Thanks & Regards Vijender Reddy
    Monday, February 21, 2011 5:51 PM
  • Vijender,

    There is no additional overhead after the initial loading of the plugin assembly.  Once the assembly is loaded into the CRM Web Application hosted AppDomain, it will be cached and re-used until the AppDomain is unloaded.  I would imagine this would correspond with the recycling of the IIS Application Pool.

    And yes, Database is the default, for the reasons David mentioned.


    --pogo (pat)
    Monday, February 21, 2011 10:58 PM