Wednesday, September 11, 2013

How to remote debug Microsoft CRM plugin?

0. Tried Visual Studio 2010, failed. 32 bit VS not working with 64 bit remote debugger.
Error message:
Unable to attach to the process. The 32-bit version of the Visual Studio Remote Debugging Monitor (MSVSMON.EXE) cannot be used to debug 64-bit processes or 64-bit dumps. Please use the 64-bit version instead.
Certainly, you can not connect 2010 remote debugger with 2012
Unable to connect to the Microsoft Visual Studio Remote Debugging Monitor named 'CHATHAM\rwang@CRM'.  The Microsoft Visual Studio Remote Debugging Monitor (MSVSMON.EXE) does not appear to be running on the remote computer. This may be because a firewall is preventing communication to the remote computer. Please see Help for assistance on configuring remote debugging.

1. Remote tools for Remote Tools for Visual Studio 2012 Update 2
http://www.microsoft.com/en-my/download/details.aspx?id=38184
2. Run and Get Tcp/ip port number
3. Copy plugin pdb file into CRM box folder:
 C:\Program Files\Microsoft Dynamics CRM\Server\bin\assembly
4. In VS2012, Debug -> attach, put mahine_name@port_number in the qualifier box
5. Then attach to w3p process.

How to solve “Action failed for: Assembly must be registered in isolation” when try to register a plugin into CRM?

The user account must exist in the Deployment Administrators group of Deployment Manager.

The Whole error message:
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Action failed for assembly 'SamplePlugins, Version=0.0.0.0, Culture=neutral, PublicKeyToken=829f574d80e89132': Assembly must be registered in isolation.

Refenrence:
http://blogs.msdn.com/b/crminthefield/archive/2011/08/17/error-message-assembly-must-be-registered-in-isolation-when-registering-plugins-in-microsoft-dynamics-crm-2011.aspx