Asked by:
CRM 2011: Unable to load plug-in type when trying to delete a SDK Message Processing Step

Question
-
Hello,
I have recently migrated a CRM 4 to CRM 2011.
Although I did my best to remove all of the redundant/no longer relevant customisations prior to the import, I forgot a couple of plug-ins.
Although these plug-ins are disabled in CRM 2011, when I try to delete them I get the following error:
"Unable to laod plug-in type"
The log shows the following:
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: System.Web.HttpUnhandledException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #2A577FBDDetail: <OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts"> <ErrorCode>-2147220970</ErrorCode> <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" /> <Message>System.Web.HttpUnhandledException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #2A577FBD</Message> <Timestamp>2012-05-15T10:30:08.537352Z</Timestamp> <InnerFault> <ErrorCode>-2147204720</ErrorCode> <ErrorDetails xmlns:d3p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" /> <Message>Unable to load the plugin type: Microsoft.Crm.Accelerator.EventManagement.CampaignResponseCreateHandler</Message> <Timestamp>2012-05-15T10:30:08.537352Z</Timestamp> <InnerFault i:nil="true" /> <TraceText i:nil="true" /> </InnerFault> <TraceText i:nil="true" /> </OrganizationServiceFault>
Any ideas on how I can remove these plug-in files for good?
Thanks for the help
Regards,
P.
MCC, MCT, MCP, MCTS
If you find this post helpful then please "Vote as Helpful". If I helped you with an answer to a question then please "Mark As Answer".Tuesday, May 15, 2012 10:32 AM
All replies
-
Hi,
I am assuming that these plugins are registered in the database and you are trying to delete them through plugin registration tool? Does your plugin has some dependencies which don't exist anymore?
Ashish Mahajan, CRM Developer, CSG (Melbourne)
My Personal Website: http://www.ashishmahajan.com
My Blogs: http://ashishmahajancrm.blogspot.com.au and http://ashishmahajancrm.wordpress.com
My Youtube Channel: http://www.youtube.com/user/ashishmahajanmscrmMy Linkedin: Tuesday, May 15, 2012 10:46 AM -
Hi,
I was trying to delete them through Dynamics CRM's site, like this:
Is there not the correct way to do it?
This plug-in used to work around the Campaign Response entity. I have removed all the customisations for it, including custom relationships and fields. All forms are reset to the default CRM forms.
Regards,
P.
MCC, MCT, MCP, MCTS
If you find this post helpful then please "Vote as Helpful". If I helped you with an answer to a question then please "Mark As Answer".Tuesday, May 15, 2012 11:27 AM -
Hi pmdci,
Try with the plugin registration tool:
http://pluginregcrm2011.codeplex.com/releases/view/65244
here is a great article on how to use the tool:
http://msdn.microsoft.com/en-us/library/hh237515.aspxIf with the plugin registration tool you still can't un-register my advise would be deleting the plugin in CRM 4 and then upgrade, I'm guessing you are not in production with your newly imported CRM 2011?
Also install the latest rollups, this should also help resolve some of these issues.
Regards
Nuno
Visit my blog for CRM material, improving performance, kerberos, IFD, development tips, etc. :) http://quantusdynamics.blogspot.com
- Edited by nrodri Tuesday, May 15, 2012 11:34 AM
Tuesday, May 15, 2012 11:33 AM -
Hi Nuno,
Is there anywhere I can find a compiled version of this tool? It amazes me that a source code is released but no binaries...
thanks
P.
MCC, MCT, MCP, MCTS
If you find this post helpful then please "Vote as Helpful". If I helped you with an answer to a question then please "Mark As Answer".Tuesday, May 15, 2012 11:37 AM -
Hi,
Open the solutions file from the list of files (.sln ext). This will open the solution in your visual studio. Then you can compile and get the exe in your debug/release folder.
I hope this helps. If my response answered your question, please mark the response as an answer and also vote as helpful.
Ashish Mahajan, CRM Developer, CSG (Melbourne)
My Personal Website: http://www.ashishmahajan.com
My Blogs: http://ashishmahajancrm.blogspot.com.au and http://ashishmahajancrm.wordpress.com
My Youtube Channel: http://www.youtube.com/user/ashishmahajanmscrmMy Linkedin: - Proposed as answer by Ashish Mahajan Technical Architect, Writer Tuesday, May 15, 2012 11:39 AM
Tuesday, May 15, 2012 11:39 AM -
No Visual Studio here. I am on a client site and there are no VS. I can't download it either.
MCC, MCT, MCP, MCTS
If you find this post helpful then please "Vote as Helpful". If I helped you with an answer to a question then please "Mark As Answer".Tuesday, May 15, 2012 11:42 AM -
Hi,
The only alternative is to search for the plugin registration executable from the internet. May be you can find it on Microsoft or any partner site.
I hope this helps. If my response answered your question, please mark the response as an answer and also vote as helpful.
Ashish Mahajan, CRM Developer, CSG (Melbourne)
My Personal Website: http://www.ashishmahajan.com
My Blogs: http://ashishmahajancrm.blogspot.com.au and http://ashishmahajancrm.wordpress.com
My Youtube Channel: http://www.youtube.com/user/ashishmahajanmscrmMy Linkedin: - Proposed as answer by Ashish Mahajan Technical Architect, Writer Tuesday, May 15, 2012 11:44 AM
Tuesday, May 15, 2012 11:44 AM -
I found the compiled Plug In registration tool on the internet and I tried it.
unfortunately I get the same error.
How can I delete the plug-in from CRM4?
Regards,
P.
MCC, MCT, MCP, MCTS
If you find this post helpful then please "Vote as Helpful". If I helped you with an answer to a question then please "Mark As Answer".Tuesday, May 15, 2012 11:55 AM -
To remove it from CRM 4 you use the plugin registration tool but the CRM 4 version.
here is a link for the tool (this gives you the executable :) )
http://archive.msdn.microsoft.com/crmplugin/Release/ProjectReleases.aspx?ReleaseId=2010
Visit my blog for CRM material, improving performance, kerberos, IFD, development tips, etc. :) http://quantusdynamics.blogspot.com
Tuesday, May 15, 2012 12:12 PM -
I'm afraid we are far away on this project and having to delete this junk from CRM4 to have the organisation imported again would mean we will have lost days of work.
These plug-ins are effectively disabled so they aren't doing any harm as far as I know.
This needs to be resolved in CRM 2011. :(
Regards,
P.
MCC, MCT, MCP, MCTS
If you find this post helpful then please "Vote as Helpful". If I helped you with an answer to a question then please "Mark As Answer".Tuesday, May 15, 2012 12:17 PM -
Hi,
Nrodri is right. You have to use the tool.
My advise would be to leave it as it is till the time either it creates problems (which it will not as it is disabled) or there is a solution. Later on when you will update your environment, then again give it a try.
I hope this helps. If my responses answered your question, please mark these responses as an answer and also vote them as helpful.
Ashish Mahajan, CRM Developer, CSG (Melbourne)
My Personal Website: http://www.ashishmahajan.com
My Blogs: http://ashishmahajancrm.blogspot.com.au and http://ashishmahajancrm.wordpress.com
My Youtube Channel: http://www.youtube.com/user/ashishmahajanmscrmMy Linkedin: - Proposed as answer by Ashish Mahajan Technical Architect, Writer Tuesday, May 15, 2012 12:37 PM
Tuesday, May 15, 2012 12:37 PM -
pmdci,
I think back in the days of CRM 4, these Event Accelerator plugin must have the dlls stored in Disk instead of Database.
That error came up because CRM need to get a hold of the plugin reference dlls before being able to delete it. Since they were stored in Disk, you might need to copy them from the old CRM 4 server to the new one. Once you've done that, you should be able to delete this then.
I hope this helps. If my responses answered your question, please mark these responses as an answer and also vote them as helpful.
Dimaz Pramudya - CRM Developer - CSG (Melbourne) www.xrmbits.com http://twitter.com/xrmbits
- Proposed as answer by Dimaz Pramudya (www.xrmbits.com) Tuesday, May 15, 2012 1:27 PM
Tuesday, May 15, 2012 1:27 PM -
Hi Dimaz,
Sounds like a plan! :)
But where should I copy those DLLs to in the CRM 2011 server?
Regards,
P.
MCC, MCT, MCP, MCTS
If you find this post helpful then please "Vote as Helpful". If I helped you with an answer to a question then please "Mark As Answer".Tuesday, May 15, 2012 1:32 PM -
pmdci,
You can check whether the assembly is registered on disk or on database (in the plugin registration tool select the plugin assembly and select "update" to see the details).
If it is registered on disk then you need to copy the dll to Program Files / Ms Dynamics CRM / Server / bin / assembly. Then try to delete again.
Note that deleting a plugin step either from the application (as you had initially tried) or through the plugin registration tool has exactly the same effect, there is no "magic" on the plugin registration tool.
Gonzalo | gonzaloruizcrm.blogspot.com
Tuesday, May 15, 2012 1:40 PMModerator -
Hi Gonzalo,
Thank you for the hint.
Unfortunately it says that the plug-in is in the database... :(
In fact I went to look for the assembly in CRM4 and there is none.
Here is what the log shows in the Plug-in registration tool when I try to delete the assembly.
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Unable to load the plugin type: Microsoft.Crm.Accelerator.EventManagement.CampaignResponseCreateHandler
Detail: <OrganizationServiceFault xmlns="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<ErrorCode>-2147204720</ErrorCode>
<ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>Unable to load the plugin type: Microsoft.Crm.Accelerator.EventManagement.CampaignResponseCreateHandler</Message>
<Timestamp>2012-05-15T14:07:02.6033082Z</Timestamp>
<InnerFault>
<ErrorCode>-2147204720</ErrorCode>
<ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>Unable to load the plugin type: Microsoft.Crm.Accelerator.EventManagement.CampaignResponseCreateHandler</Message>
<Timestamp>2012-05-15T14:07:02.6033082Z</Timestamp>
<InnerFault>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>System.IO.FileLoadException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #E73B5FC5</Message>
<Timestamp>2012-05-15T14:07:02.6033082Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<TraceText i:nil="true" />
</InnerFault>
<TraceText i:nil="true" />
</OrganizationServiceFault>
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.Xrm.Sdk.IOrganizationService.Delete(String entityName, Guid id)
at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.DeleteCore(String entityName, Guid id)
at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.Delete(String entityName, Guid id)
at PluginRegistrationTool.RegistrationHelper.Unregister(CrmOrganization org, ProgressIndicator prog, ICrmEntity[] crmEntity)
at PluginRegistrationTool.OrganizationControl.toolUnregister_Click(Object sender, EventArgs e)Regards,
P.
MCC, MCT, MCP, MCTS
If you find this post helpful then please "Vote as Helpful". If I helped you with an answer to a question then please "Mark As Answer".Tuesday, May 15, 2012 2:09 PM -
if it's in database you can try to select the plugin assembly in the registration tool, then click "update". Then you need to browse for the dll and update the dll (this will make sure that it is correctly registered), then you can try to delete again. If that doesn;t work you could probably contact MS support, you seem to be in a corrupted state.
Gonzalo | gonzaloruizcrm.blogspot.com
Tuesday, May 15, 2012 2:38 PMModerator -
Gonzalo,
Good idea. I will download the solution again from Codeplex and try to reload the dlls.
I also noticed that in a Vanilla CRM 2011 deployment, the Plug-in registration tool shows a plug-in called Microsoft.Crm.Extensibility.V3CalloutProxyPlugin.
However I don't see suck plug-in in a CRM4 to CRM2011 import. Any ideas?
Regards,
P.
MCC, MCT, MCP, MCTS
If you find this post helpful then please "Vote as Helpful". If I helped you with an answer to a question then please "Mark As Answer".Tuesday, May 15, 2012 2:44 PM -
That plugin was removed from CRM 2011, there is no longer support for CRM 3.0 callouts in CRM 2011. If the plugin you are trying to register is a callout and has not been upgraded to a plugin then it will not work in CRM 2011
Gonzalo | gonzaloruizcrm.blogspot.com
Tuesday, May 15, 2012 2:51 PMModerator -
Hi Gonzalo,
the plug-in I mentioned (Microsoft.Crm.Extensibility.V3CalloutProxyPlugin) is on a default dynamics CRM 2011 installation (no import). Check it out:
MCC, MCT, MCP, MCTS
If you find this post helpful then please "Vote as Helpful". If I helped you with an answer to a question then please "Mark As Answer".Tuesday, May 15, 2012 2:59 PM -
Gonzalo,
Back to the issue at hand, I got the DLL for that plug-in from codeplex (http://crmaccelerators.codeplex.com/releases/view/19077). The problem is that the DLL doesn't load because it was designed for CRM4. Here is the error I get when I try to load it:
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Crm.Sdk, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes)
at System.Reflection.RuntimeAssembly.GetExportedTypes()
at PluginRegistrationTool.AssemblyReader.RetrievePluginsFromAssembly(String path)
at PluginRegistrationTool.AssemblyReader.RetrievePluginsFromAssembly(String path)
at PluginRegistrationTool.RegistrationHelper.RetrievePluginsFromAssembly(String pathToAssembly)
at PluginRegistrationTool.PluginRegistrationForm.btnLoadAssembly_Click(Object sender, EventArgs e)Basically it is some sort of chicken-and-egg situation. It doesn't laod because it is not for CRM 2011 and it must be loaded in order to be removed (?!) :(
MCC, MCT, MCP, MCTS
If you find this post helpful then please "Vote as Helpful". If I helped you with an answer to a question then please "Mark As Answer".Tuesday, May 15, 2012 3:01 PM -
When you installed CRM 2011, it should have installed in the GAC a redirect so everytime that the version 4.0.0.0 of the CRM assemblies are loaded it should redirect to the new version, but that only happens on the CRM Server. Are you running the plugin registratrion tool from the CRM server (locally)? Otherwise you'd have to copy the Microsoft.Crm.Sdk.dll from CRM4 in the same path as the plugin you are trying to update.
Regarding the V3CalloutProxy plugin, this is normal, do not modify the Microsoft.Crm.ObjectModel assembly you can just ignore it.
Gonzalo | gonzaloruizcrm.blogspot.com
Tuesday, May 15, 2012 6:22 PMModerator -
Hi Gonzalo,
I am running the plug-in registration tool from the server (I remote desktop into it). No idea why it isn't trying to load the legacy Microsoft.crm.sdk.dll file, since you mentioned that a redirect is created for it. I tried with different CRM 2011 installs (2) and they both return the same error when trying to load the plug-in dll (MSA_EventRegistration.dll)
I also copied Microsoft.crm.sdk.dll to the same directory in which the MSA_EventRegistration.dll (the plug-in I am trying to reload/update) is located.
The version for the Microsoft.crm.sdk.dll is 4.0.7.333.2140
Any ideas?
MCC, MCT, MCP, MCTS
If you find this post helpful then please "Vote as Helpful". If I helped you with an answer to a question then please "Mark As Answer".Wednesday, May 16, 2012 4:28 PM -
Try to add the Microsoft.crm.sdk.dll to GAC and try to register the plugin again.
CRM 4 i think supported 32 bit as well as 64 bit assemblies. Please confirm if your assembly is 32 bit or 64 bit. You cannot install 32 bit assemblies on 64 bit platform.
Sam
Dynamics CRM MVP | Inogic | http://inogic.blogspot.com| news at inogic dot com
If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"
Thursday, May 17, 2012 8:58 AM -
Hi Sam,
Where do I locate the GAC?
Also, the CRM4 we are about to decommission is 64bit. And CRM 2011 is (as always 64 bit).
Interesting that this whole issue is around the dreadful Events accelerator for CRM4. when this accelerator was installed in CRM4, it added a plug-in dll, and it worked without any issues with the CRM4.
MCC, MCT, MCP, MCTS
If you find this post helpful then please "Vote as Helpful". If I helped you with an answer to a question then please "Mark As Answer".Thursday, May 17, 2012 9:03 AM -
Hi pmdci,
For .NET 2.0 until .NET 3.5, you can locate the GAC by going to Start -> Run and type in assembly. Once you have the GAC window open, you can drag and drop the assembly files to install them.
Once you install the DLLs into the GAC, make sure that you restart the CRM 4 App Pool (or do IISRESET).
I hope this helps. If my response answered your question, please mark the response as an answer and also vote as helpful.
Dimaz Pramudya - CRM Developer - CSG (Melbourne) www.xrmbits.com http://twitter.com/xrmbits
- Proposed as answer by Dimaz Pramudya (www.xrmbits.com) Thursday, May 17, 2012 9:50 AM
Thursday, May 17, 2012 9:50 AM -
Hi Dimaz,
I tried dragging the file to install it, but I get an access denied error...
MCC, MCT, MCP, MCTS
If you find this post helpful then please "Vote as Helpful". If I helped you with an answer to a question then please "Mark As Answer".Thursday, May 17, 2012 10:00 AM -
Do you have local admin rights to the server? In order for you to install assemblies in GAC, you will need to have local admin rights.
If that doesn't work, can you try do IISRESET prior to drag and drop the assemblies?
Dimaz Pramudya - CRM Developer - CSG (Melbourne) www.xrmbits.com http://twitter.com/xrmbits
Thursday, May 17, 2012 10:04 AM -
Yes I am local admin. I tried IISRESET... Doesn't work... :(
MCC, MCT, MCP, MCTS
If you find this post helpful then please "Vote as Helpful". If I helped you with an answer to a question then please "Mark As Answer".Thursday, May 17, 2012 10:06 AM -
you need to use gacutil.exe to place assemblies in the GAC. It comes with .Net framework/visual studio.
Gonzalo | gonzaloruizcrm.blogspot.com
Thursday, May 17, 2012 11:55 AMModerator -
You should also try placing the assembly in the same path as pluginregistration.exe
Gonzalo | gonzaloruizcrm.blogspot.com
Thursday, May 17, 2012 12:14 PMModerator -
I copied the files microsoft.crm.sdk.dll and MSA_EventRegistration.dll to the same directory as pluginregistration.exe and tried to update the MSA_Eventregistration.dll located there.
Didn't work... I get the same error as before :(
I can't seem to find GACUTIL.EXE... I assume I ahve all the .NET framework stuff since I have CRM 2011 on the server. So I assume gacutil.exe should be there somewhere?
I can't install Visual Studio on the server...
Regards,
P.
MCC, MCT, MCP, MCTS
If you find this post helpful then please "Vote as Helpful". If I helped you with an answer to a question then please "Mark As Answer".Thursday, May 17, 2012 12:45 PM -
Hi pdmci:
Been a bit since you posted this .. so I'm guessing you may have already resolved. There are a few posts like this and they all seem to be unresolved so I am adding a solution that worked for me.
I recently ran into the same issue. It seems to be an error when you go directly from RTM to UR6 then import a CRM organization. In my case I installed CRM went to UR6 then UR8, then imported a CRM 4 organization. Here is the link to the MSFT KB Article:
http://support.microsoft.com/kb/2705840?wa=wsignin1.0
The bottom line - the web.config file needs to tell the application to redirect from the old version of the microsoft.crm.sdk.dll to the new version. This KB Article shows you how to readd the section to enable this redirect.
Cheers!
Gaurav
Saturday, March 23, 2013 2:58 AM