Thursday, January 19, 2012

Be Careful Changing Plugin Names in On-Disk Deployments of Microsoft Dynamics CRM

I made a rookie mistake the other day that I figured I would highlight quickly.  I have a habit of deploying plug-in's on disk during testing and later moving them to the database because  I can do a quick iisreset and replace the plugin assembly and pdb file in the \server\bin\assembly folder and then just re-test immediately without re-configuring any processing steps or even entering the plug-in registration tool.

This time I realized that I named one of my plug-in classes improperly and wanted to change it even though the particular plug-in class was registered to processing steps.  With the new assemblies in place it caused a bunch of errors and I could no longer unregister the assembly or it's steps.   It seemed I had gotten myself into a pickle.

The error the plug-in registration tool gave was pretty good though and I eventually changed the plug-in class to it's old name, did an iisreset, and replaced it in the \server\bin\assembly directory.  Then I was able to go into the plug-in registration tool and unregister the assembly and properly change the names before re-registering.  This is another reason I am sure why Gonzalo Ruiz (another MVP) is so adamantly against on-disk registration under any circumstances.  While I don't use it for production really anymore, I choose to ignore his stance on using it for development.  :)

-  Have a great Thursday!

-

No comments:

Post a Comment