DynamicsCRMProvider
DynamicsCRMProvider copied to clipboard
The field, constructor or member 'name' is not defined
I tried to execute the example and run into the following
error:
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.
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.
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.
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
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.
Probably we should reuse MS versioning strategy and release DynamicsCRMProvider
compiled using all supported CRM SDK
-
CRM 2015
- package version number starting with7.x
. -
CRM 2013
- package version number starting with6.x
. -
CRM 2011
- package version number starting with5.x
.
// cc https://github.com/fsprojects/DynamicsCRMProvider/issues/9