4

We're in the process of upgrading from CRM 2011 to CRM 2016 and as such are rewriting and restructuring quite a lot of our back end code. One of the things we'd like to do is move the Early Bound classes from one gigantic file with all of the classes in, to a single class per file.

I know this was available in CRM 4.0, and that it's doable via the XrmToolBox using the Early Bound Generator plugin, but I can't figure it out for the life of me!

Here is my command line for running CrmSvcUtil:

"C:\CRM_SDK\sdk\bin\crmsvcutil.exe" /url:http://XXX/XRMServices/2011/Organization.svc /o:"C:\CRM_SDK\sdk\Bin\Entities" /n:XXX.crm /serviceContextName:XrmServiceContext /domain:XXX /username:XXX /password:XXX

Currently this just outputs 1 file, but I want somewhere in the region of 250 files!

Any help would be appreciated!

Filburt
  • 17,626
  • 12
  • 64
  • 115
cward0909
  • 96
  • 6
  • From what I've seen in the [XrmToolBox Early Bound Generator Plugin](https://github.com/daryllabar/DLaB.Xrm.XrmToolBoxTools) it [simply rips apart](https://github.com/daryllabar/DLaB.Xrm.XrmToolBoxTools/blob/master/DLaB.CrmSvcUtilExtensions/BaseCustomCodeGenerationService.cs) the single generated file. Shouldn't be too hard to mimic this in a PowerShell script. – Filburt Dec 17 '15 at 11:46

1 Answers1

1

The Early Bound Generator has custom code that runs as a part of the write process of the CrmSvcUtil that splits apart the file, post generation. There is no supported method for doing it via the CrmSvcUtil without custom code. Any reason you don't just use the Early Bound Generator? You can run it in command line mode if you're wanting to make it part of the build process. It actually spits out the required command line when you generate the entities/optionsets/actions.

Daryl
  • 18,592
  • 9
  • 78
  • 145
  • If you need additional information, feel free to contact me on gitter https://gitter.im/daryllabar/DLaB.Xrm.XrmToolBoxTools – Daryl Jan 12 '16 at 13:55