DynamicsCRMProvider icon indicating copy to clipboard operation
DynamicsCRMProvider copied to clipboard

The field, constructor or member 'name' is not defined

Open MadButcher opened this issue 9 years ago • 5 comments

I tried to execute the example and run into the following error: image

The provider recognizes customized entities, but does not show the attributes.

How can I get this working?

Note, this is a on premise installation. If I run this versus Dynamics Online it works like charm.

MadButcher avatar Jul 15 '15 13:07 MadButcher

this should be working, what version of the SDK is it? The TP is old and there have been several versions of CRM since; I can only think that something must have changed with relation to getting the metadata via the api.

pezipink avatar Jul 15 '15 14:07 pezipink

I am using the assemblies which came with the nuget package (2011),

Strange is, that online is working and on premise is not. Both CRM instances are version 2015.

MadButcher avatar Jul 15 '15 14:07 MadButcher

Yes it is odd that the online one is working, that was more of a pain to get working in the first place :) Unfortunately it is very hard for me to help without seeing it; All I can really recommend at the moment is you debug the type provider and see what is happening when it tries to get the attribute metadata here, and we can see where to go from there

https://github.com/fsprojects/DynamicsCRMProvider/blob/master/src/DynamicsCRMProvider.DesignTime/XrmDesignTime.fs#L143

pezipink avatar Jul 15 '15 14:07 pezipink

What I can see is that exception:

System.Runtime.Serialization.SerializationException occurred Message: A first chance exception of type 'System.Runtime.Serialization.SerializationException' occurred in System.Runtime.Serialization.dll Additional information: Error in line 1 position 518994. Element 'http://schemas.microsoft.com/xrm/2011/Metadata:AttributeMetadata' contains data from a type that maps to the name 'http://schemas.microsoft.com/xrm/2013/Metadata:ImageAttributeMetadata'. The deserializer has no knowledge of any type that maps to this name. Consider changing the implementation of the ResolveName method on your DataContractResolver to return a non-null value for name 'ImageAttributeMetadata' and namespace 'http://schemas.microsoft.com/xrm/2013/Metadata'.

Edit:

Compiling it against SDK 2015 fixes the issue.

Many thanks for the quick response.

MadButcher avatar Jul 16 '15 11:07 MadButcher

Probably we should reuse MS versioning strategy and release DynamicsCRMProvider compiled using all supported CRM SDK

  • CRM 2015 - package version number starting with 7.x.
  • CRM 2013 - package version number starting with 6.x.
  • CRM 2011 - package version number starting with 5.x.

// cc https://github.com/fsprojects/DynamicsCRMProvider/issues/9

sergey-tihon avatar Jul 16 '15 21:07 sergey-tihon