Useful CRM Tips

Useful CRM Tips...
Showing posts with label CRM 2011 (Plugin). Show all posts
Showing posts with label CRM 2011 (Plugin). Show all posts

Monday, July 02, 2012

How to Debug CRM 2011 online plugin

Below are the steps to debug online plugin:

  • Install Plugin Pro-filer in the plugin registration Tool.(if you don’t find this option, download latest SDK)


  • Now Register the plug-in and step on the Microsoft Dynamics CRM server. Keep a copy of the debug compiled plug-in assembly on the computer where you are running the tool(@SDK\sdk\tools\pluginregistration\bin\Debug)
  • Select a plug-in step and click Profile to enable profiling.
  • Perform the operation in Microsoft Dynamics CRM that causes the plug-in to run. Ex: Here updation of Account which trigger the plugin
  
  • Now the plug-in throws an exception and the Business Process Error dialog is displayed, click Download Log File and save this file.
 
  • In the Plug-in Registration tool, click Debug.
 
  • Debug Dialog will open

  • select the Saved Error Log File in the “Profile Location” and then select the Plugin assembly location in the “Assembly Location” where .rdb file available to debug. select the plugin which needs to be debug in the “Plug-in” dropdown list. 
  • Now open the plugin solution in Visual Studio and then place the break point to debug, attach the debugger to PluginRegistration.exe process
 
  • Click Start Plug-in Execution in the Debug Existing Plug-in dialog box
 
  • Now the debugger will start debugging from the break point in  the VS. Now you can debug the plugin in the normal way like on-premise

Resolution to the build error when microsoft.identitymodel is not refered

 
If you have installed the Windows Identity Foundation but can't find the Microsoft.IdentityModel dll. Then by adding the following reference to the csproj file in notepad :
<Reference Include="Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />

 It works...