scottdurow / SparkleXrm

An open-source library for building Dynamics CRM XRM solutions using Script#, jQuery & Knockoutjs.
MIT License
265 stars 197 forks source link

To fix the issue where Earlybound generation fails when base language is not 1033 and translations are not available #442 #443

Open erkoolio opened 3 years ago

erkoolio commented 3 years ago

This to fix issue 442 when base language is not 1033 AND there are no translations available. This will also add PascalCase to optionsets, this is the (Microsoft) way.

Naming service is copied and modified from issue #349, thanks @JannyM85!

This will not break the base functionality in any way. It does add PascalCase, if that is an issue, then it can be made optional.

scottdurow commented 2 years ago

Thank you for this. I really thought this issue had been fixed in the most recent release - could you provide repro steps, the error details and version you are using please?

erkoolio commented 2 years ago

To reproduce: You need an environment with base language 1035 (Finnish). No other language packages/translations. Spkl version 1.0.640.

I created a clean project with nothing but SPKL and tried to create early bound classes. Error from console is CrmSvcUtil Error: 2 : Exiting program with exit code 2 due to exception : System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object. CrmSvcUtil exited with error 2 Error Code=1

I think the beta version worked (1.0.6.3-beta or something).