Search code examples
c#dynamics-crm-4crm

CRM 4 WorkingWithDynamicsCrm4.Plugin how to debug?


I use CRM 4.0 and VS 2008. I installed the CRM SDK and WorkingWithCRM4.Plugin (http://www.microsoft.com/mspress/companion/9780735623781/).
I managed to deploy I think the plugin's dll with the PluginRegistration.exe tool which I for from the SDK.

I try to make the sample code from the WorkingWithCRM4.Plugin to work. The problem is, nothing seems to happen. I try to debug the code, but it seems I can't attach to the right process (w3wp.exe) or the Execute event is not called. Does anybody has experience with: WorkingWithCRM4.Plugin and tell me how can make it work or debug?


Solution

  • These are the steps I do:

    1. Sign a key.
    2. Build.
    3. Register the Plug-in.
    4. Place the generated .pdb file into the bin folder of the CRM.
    5. Debug the plug-in by attaching it to the w3wp.exe process.
    6. Trigger your plugin by triggering the related Message on the related Entity.

    Note: Sometimes you may have to to do an iisreset if there is something wrong.