- Notifications
You must be signed in to change notification settings - Fork 54
Description
Hi. I would like to be able to define what strongly type assembly the ServiceClient should use when creating it.
The issue is now, if I have an application that contains multiple early-bound entitites files (each in seperate assemblies and namespaces) from different systems (on-premise crm and dataverse) that have the same entitity, ie contact, it will throw an exception: A proxy type with the name contact has been defined by another assembly.
This is a common issue when working with multiple early-bound files from different systems, and the workaround have been using EnableProxyTypes(assembly) method on the OrganizationServiceProxy class (on-premise) where you send it what assembly it should "reflect" from.
But the ServiceClient does not have any EnableProxyTypes method or the like, and seems to automatically "reflect" all classes with the [assembly: Microsoft.Xrm.Sdk.Client.ProxyTypesAssemblyAttribute()] regardless of what assembly it resides in, when it's created.
I have tried to use the Clone method on ServiceClient, sending with the strongly type assembly, but it seems to initilize the service-client and I get the same error as above.