Deploy Plugin assembly failed and now Plugin Registration won't pull back any Organizations plus errors in trace RRS feed

  • Question

  • Hello all.  I'm using CRM 2013 RU1 SP1 On Premises (, and I updated a Plugin built in C# then deployed it to one of my Organizations.  The plugin registration failed, and now when I go back into the Plugin Registration Tool and login I get a list of my organizations, I select any organization (I have 4 setup), and it just returns me back to the list but with no organizations listed.  The only way I've found to get it working again is to disable the Organization I tried to import the plugin into, restore it from backup, re-enable it, then connect to a different organization through Plugin Registration, if it's successful then I can reconnect to the restored Organization.  It's like the failed plugin registration failure broke something beyond just the organization, and things have to sort of reset for it to get fixed.  

    When I'm unable to connect to any organizations I get this error in the Trace log on the CRM web server:

    [2015-04-29 08:15:17.406] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:   21 |Category: Platform.Sdk |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: 118af2b9-d854-409f-b68a-3c3177431741 | ServiceModelTraceRedirector.TraceData  ilOffset = 0x45
    >http://msdn.microsoft.com/en-US/library/System.ServiceModel.Diagnostics.TraceHandledException.aspxHandling an exception. Exception details: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Xrm.Client, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

    This is not from registering the plugin but rather attempting to just connect to the organization through plugin registration after the plugin registration process failed.  Could the plugin have the Microsoft.Xrm.Client referenced incorrectly somehow?  The plugin I'm attempting to register is actually one that's been setup on the server before, I just made some updates to it, but even with this how could registering a plugin even if it has issues cause the plugin registration tool to fail with an error like this?

    Thanks for any thoughts or insight.

    • Edited by Sam Alex Wednesday, April 29, 2015 1:31 PM
    Wednesday, April 29, 2015 1:31 PM

All replies

  • Update on this, I added Microsoft.Xrm.Client.dll to the CRMWeb\Bin folder on both of my CRM web servers and the error appears to have gone away.  Why has this never been an issue before?  Also can someone point me to documentation or explain how plugins or DLL assemblies integrate into CRM?  I have yet to try to register the plugin again, but I'll do so shortly and report back on whether or not that error disappeared.

    Thanks --

    Wednesday, April 29, 2015 1:58 PM
  • A referenced DLL needs to be in the same folder of the plugin or registered in the GAC.  If you look around, you may find the DLL but it may be a different version compared to the one that you referenced in your project.

    Jason Peterson

    Wednesday, April 29, 2015 3:35 PM