locked
VS 2008 & Plugin registration - multiple plugins RRS feed

  • Question

  • Since I'm relatively new to both VS 2008 and the CRM, I may be missing something obvious.

    I have a project CRM.Plugins with a TaskRoute.cs class. I have followed the instructions in the SDK and Programming with CRM 4 book, and have successfully registered the plugin. However, if I add an additional class to the CRM.Plugins, the solution builds fine but loading the dll in the Plugin Registration Tool only shows up the TaskRoute plugin. The other class also inherits from IPlugin, but I can't seem to get the Registration Tool to see it. Are there additional steps I need to take? Something possibly obvious I missed?
    Wednesday, July 22, 2009 12:20 PM

Answers

All replies

  • Hi,

    Could it be   public keyword being missed?
    public  class Class2: IPlugin 

    Regards,
    Nishant Rana


    http://nishantrana.wordpress.com
    • Marked as answer by roderyk Monday, July 27, 2009 6:46 AM
    Wednesday, July 22, 2009 12:37 PM
  • The plug-in signature is captured when you register the assembly . You need to re-register the plug-in in order to see the new classes. Another option is to adopt a single entry point plug-in and manage the messages execution path with a switch construct. E.g.

     

    switch( context.MessageName )
    {
        case MessageName.Create:

                 break;

        case MessageName.Update:

                 break;
    }

     

    The advantage of using such approach is that it does not require you to re-register the plug-in and is a good development practice if you’re thinking ahead e.g. future updates / ms rollups / new version / new requirements etc.


    Blog: http://mscrm4ever.blogspot.com/ * Website: http://gicrm.upsite.co.il/
    Wednesday, July 22, 2009 12:55 PM
  • Yes, it was this silly mistake! Thanks for pointing it out...

    (Also, thanks Adi for the information, but I am already using switch (context.MessageName); It's just that I have several different kind of plugins so I need to separate out the logic a little more)
    Monday, July 27, 2009 6:46 AM