Posts Tagged ‘ProxyTypesAssemblyAttribute’

“Object of type can not be converted to type ‘IBusinessEntity’ ” exception with crm Early Binding

December 28, 2011 3 comments


You may come across below exception in Plug-Ins, while performing Create/Update operation  using CRM early binding

Exception: Unhandled Exception: System.InvalidOperationException: Object of type ‘entity_name‘ can not be converted to type ‘IBusinessEntity’

Fix :-

  • You need to add below line in your Plug-in project’s “AssemblyInfo.cs” file (Navigate to project folder and go to ..\Properties\AssemblyInfo.cs)

[assembly: Microsoft.Xrm.Sdk.Client.ProxyTypesAssemblyAttribute()]



  • Clean and Rebuild the solution
  • Register the plug-in assembly

Hope it helps 🙂