Sunday 24 January 2016

System.InvalidCastException: Unable to cast object of type ‘Microsoft.Xrm.Sdk.Entity’ to type

Hi,
 
Today suddenly all our plugins where we are using early binding thrown exception saying the below message.
 
Unable to cast object of type ‘Microsoft.Xrm.Sdk.Entity’ to type
 
After sometime, fixed the issue by adding the below line in AssemblyInfo.cs of the plugin project.
 
[assembly: Microsoft.Xrm.Sdk.Client.ProxyTypesAssemblyAttribute]

Hope this helps.
 
--
Happy CRM'ing

Gopinath

No comments:

Post a Comment