Wednesday, July 29, 2015

Getting CrmSvcUtil to generate the CrmOrganizationServiceContext

It had been awhile since I generated the Early-bound classes used by a command-line setup program (MSFT walkthrough).  I had forgotten about the crmsvcutil.exe parameter that generates the CrmOrganizationServiceContext:
/codeCustomization:"Microsoft.Xrm.Client.CodeGeneration.CodeCustomization, Microsoft.Xrm.Client.CodeGeneration"

After adding the Microsoft.Xrm.Client.CodeGeneration.dll and Microsoft.Xrm.Client.dll to the directory,  the App.config constructor was available again:
using (XrmServiceContext xrm = new XrmServiceContext("Xrm"))

No comments: