locked
CRM 2013 + VS: Two sets of early-bound classes RRS feed

  • Question

  • I have generated two early bound entity classes for a console application.

    CrmSvcUtil.exe /codeCustomization:"Microsoft.Xrm.Client.CodeGeneration.CodeCustomization, Microsoft.Xrm.Client.CodeGeneration" /out:xrmdev.cs /url:http://192.168.137.10/dev1/XRMServices/2011/Organization.svc /domain: /username:xxxxxxxx /password:xxxxxxxx /namespace:XrmDev /serviceContextName:XrmServiceContext

    CrmSvcUtil.exe /codeCustomization:"Microsoft.Xrm.Client.CodeGeneration.CodeCustomization, Microsoft.Xrm.Client.CodeGeneration" /out:xrmtest.cs /url:http://192.168.137.10/dev1/XRMServices/2011/Organization.svc /domain: /username:xxxxxxxx /password:xxxxxxxx /namespace:XrmTest /serviceContextName:XrmServiceContext

    It works fine when I add only one early bound entity class .cs file, however when I add both I receive a "Duplicate 'Microsoft.Xrm.Sdk.Client.ProxyTypesAssemblyAttribute' attribute" error.

    <configuration> <configSections> <section name="microsoft.xrm.client" type="Microsoft.Xrm.Client.Configuration.CrmSection, Microsoft.Xrm.Client" /> </configSections> <connectionStrings> <add name="XrmDev" connectionString="Server=http://192.168.137.10/dev1/XRMServices/2011/Organization.svc; Domain=xxxxxxxxxx; Username=xxxxxxxxxx; Password=xxxxxxxxxx;" /> <add name="XrmTest" connectionString="Server=http://192.168.137.10/test1/XRMServices/2011/Organization.svc; Domain=xxxxxxxxxx; Username=xxxxxxxxxx; Password=xxxxxxxxxx;" /> </connectionStrings> <microsoft.xrm.client> <contexts> <add connectionStringName="XrmDev" name="XrmDev" type="Xrm.XrmServiceContext, Xrm" /> <add connectionStringName="XrmTest" name="XrmTest" type="Xrm.XrmServiceContext, Xrm" /> </contexts> </microsoft.xrm.client> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> </startup> </configuration>


    Friday, September 12, 2014 11:50 AM

All replies

  • ideally, your dev environment should have all the customization available in your test environment. If there are multiple developers, you could also build the class from the system integration environment.

    please rethink your solution architecture to see if you can bypass this error.

    adding namespace may not resolve the problem.

    Regards,

    Jithesh

    Friday, September 12, 2014 12:19 PM