Open MrCliffster opened 2 years ago
For those that stumble across this issue, the temporary workaround I use is to manually copy-paste the line that is broken into each custom action, each time I generate EBG files. The line is:
[System.Runtime.Serialization.DataContractAttribute(Namespace="http://schemas.microsoft.com/crm/2011/Contracts")]
Problem: When generating Earlybound classes including Custom APIs the Custom API files are incomplete
After running earlybound.bat, spkl successfully generates the full suite of directories and files for Entities, Actions, and OptionSets as shown:
However, the class files for the individual Custom API actions are badly formed:
The key issue is the badly formed string on line 3, which is actually part of the serialisation attributes that ![image](https://user-images.githubusercontent.com/19260617/159191721-e9ada398-b57f-4332-a7b4-555963198396.png)
crmsvcutil
generates as shown on line 10453 in the monolithic file:Suspected Cause
The regex that splits classes in
CodeSplitter.cs
is not correctly able to deal with the schema being provided bycrmsvcutil
as part of the DataContractAttribute shown in the third screenshot above. The schema namespaceNamespace="http://schemas.microsoft.com/xrm/2011/new/"
is unique to these Custom APIs in the monolithicEarlyBoundTypes.cs
file that the tool outputs. I think a fix to the regex in Spkl'sSourceCodeTypeExtractor.cs
located here, specifically the ClassRegex, should alleviate this problem.