April 7, 2012

Plugin Registration havoc, CRM 2011

It is very unfortunate that developers do their stuff without reading the proper or updated documentation from Microsoft.
This results in havoc.
:(
Recently one of our developer, had complete access to the CRM 2011 Server. To destroy the server's CRM (not intentionally) he used big spear tool "gacutil.exe".


What his problem was he was unable to register a CRM plugin from his workstation and was not succeeding. On some blog (like this one ;)) he found that he needs to register two dll files in GAC on CRM 2011 Server.


Microsoft.Xrm.Client.dll
Microsoft.Xrm.Sdk.dll


As soon as he did that, CRM stopped working. It started giving out following error:
 The Web Service plug-in failed in OrganizationId: d8c6077d-e52f-e111-b5ff-00155d000b01; SdkMessageProcessingStepId: e8af0b30-4bae-48a6-a5be-6e64af544ae1; EntityName: sitemap; Stage: 30; MessageName: RetrieveMultiple; AssemblyName: Microsoft.Crm.Extensibility.InternalOperationPlugin, Microsoft.Crm.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35; ClassName: Microsoft.Crm.Extensibility.InternalOperationPlugin; Exception: Unhandled Exception: System.MissingMethodException: Method not found: 'Void Microsoft.Xrm.Sdk.AliasedValue.set_NeedFormatting(Boolean)'.  
   at Microsoft.Crm.BusinessEntities.BusinessEntityToEntityConverter.HandleAliasing(Entity entity, IAttributeInfo attributeInfo)  
   at Microsoft.Crm.BusinessEntities.BusinessEntityToEntityConverter.Convert(ICrmConversionContext conversionContext, BusinessEntity businessEntity)  
   at Microsoft.Crm.BusinessEntities.BusinessEntityCollectionToEntityCollectionConverter.Convert(ICrmConversionContext conversionContext, BusinessEntityCollection inputCollection)  
   at Microsoft.Crm.BusinessEntities.BusinessEntityCollection.Converter.ConvertTo(ITypeDescriptorContext context, CultureInfo culture, Object value, Type destinationType)  
   at Microsoft.Crm.BusinessEntities.ConversionHelpers.Convert(ICrmConversionContext conversionContext, Object source, Type destinationType)  
   at Microsoft.Crm.Extensibility.DictionaryMapper.Map(PropertyBag inputs, ICrmConversionContext context)  
   at Microsoft.Crm.Extensibility.PropertyBagMapper.Map(PropertyBag source, ParameterCollection target, ICrmConversionContext context)  
   at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)  
   at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)  


He showed me this screen and told me to re-install the whole CRM test setup and solve the error.


Then referring the following URL
http://social.microsoft.com/Forums/en/crm/thread/bc3edd6d-c692-424c-8042-cc2f97f7e442

I registered following dll files from Server/CRMWeb/bin into the Global Assembly Cache of CRM server.


Microsoft.Xrm.Sdk.dll
Microsoft.Crm.Extensibility.dll


And it started working again!

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home