Giter Club home page Giter Club logo

Comments (9)

daryllabar avatar daryllabar commented on May 13, 2024

when you say "throws an error", is that displayed in the output, or where do you see it?

from dlab.xrm.xrmtoolboxtools.

cruentusmors avatar cruentusmors commented on May 13, 2024

Hi Daryl,

Thank you for the speedy response! Using the "full version". I am sorry but I missed the real error

Using XmlToolBox 1.2015.12.20 plugin version 1.2015.11.30

I have tried it with an empty project, also single file versus each entity in its own file. They all have the same error. I also got this error on a different org and ended up using a batch file to run the utility and that worked fine with 2016.

I removed some identifying information from below - paths and urls etc.

System.ArgumentException: An item with the same key has already been added.

Here is the whole output window

Executing "\Downloads\DLaB.Xrm.XrmToolBoxTools-Full\Plugins\CrmSvcUtil Ref\crmsvcutil.exe" /url:"https:///XRMServices/2011/Organization.svc" /namespace:"CGS.XRM" /out:"\Trunk\CGS\XRM\CGSCRMContext.cs" /servicecontextname:"CGSCRMContext" /codecustomization:"DLaB.CrmSvcUtilExtensions.Entity.CustomizeCodeDomService,DLaB.CrmSvcUtilExtensions" /codegenerationservice:"DLaB.CrmSvcUtilExtensions.Entity.CustomCodeGenerationService,DLaB.CrmSvcUtilExtensions" /codewriterfilter:"DLaB.CrmSvcUtilExtensions.Entity.CodeWriterFilterService,DLaB.CrmSvcUtilExtensions" /namingservice:"DLaB.CrmSvcUtilExtensions.Entity.OverridePropertyNames,DLaB.CrmSvcUtilExtensions"
CrmSvcUtil : CRM Service Utility [Version 7.1.0001.3108]
c 2015 Microsoft Corporation. All rights reserved.

System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at DLaB.CrmSvcUtilExtensions.Entity.CodeWriterFilterService.GenerateOptionSet(OptionSetMetadataBase optionSetMetadata, IServiceProvider services)
at Microsoft.Crm.Services.Utility.CodeGenerationService.BuildAttributeOptionSet(EntityMetadata entity, AttributeMetadata attribute, CodeTypeMember attributeMember, ServiceProvider serviceProvider)
at Microsoft.Crm.Services.Utility.CodeGenerationService.BuildEntity(EntityMetadata entity, ServiceProvider serviceProvider)
at Microsoft.Crm.Services.Utility.CodeGenerationService.BuildEntities(EntityMetadata[] entityMetadata, ServiceProvider serviceProvider)
at Microsoft.Crm.Services.Utility.CodeGenerationService.BuildCodeDom(IOrganizationMetadata organizationMetadata, String outputNamespace, ServiceProvider serviceProvider)
at Microsoft.Crm.Services.Utility.CodeGenerationService.Microsoft.Crm.Services.Utility.ICodeGenerationService.Write(IOrganizationMetadata organizationMetadata, String language, String outputFile, String outputNamespace, IServiceProvider services)
at DLaB.CrmSvcUtilExtensions.BaseCustomCodeGenerationService.WriteInternal(IOrganizationMetadata organizationMetadata, String language, String outputFile, String targetNamespace, IServiceProvider services)
at DLaB.CrmSvcUtilExtensions.BaseCustomCodeGenerationService.Write(IOrganizationMetadata organizationMetadata, String language, String outputFile, String targetNamespace, IServiceProvider services)
Output file was not updated or not found! C:\Projects\Trunk\CGS\XRM\CGSCRMContext.cs

from dlab.xrm.xrmtoolboxtools.

daryllabar avatar daryllabar commented on May 13, 2024

Replace DLaB.CrmSvcUtilExtensions.dll in the plugins\CrmSvcUtil Ref\ folder with this: https://drive.google.com/file/d/0B0By9PBv_3cDb1QtTU5SblZVaG8/view?usp=sharing

Let me know if that works.

from dlab.xrm.xrmtoolboxtools.

cruentusmors avatar cruentusmors commented on May 13, 2024

Well that is working much better!

I have switched to a single file for entities/options/actions instead of individual files. I was getting TFS exceptions like this

(Inner Exception #4) System.TimeoutException: TF400030: The local data store is currently in use by another operation. Please wait and then try your operation again. If this error persists, restart the application.

When I build the XRM project with single entities/options/actions.cs files I get a compiler error.

It looks like it is generating two officedocument_documenttype enums in the optionsets,cs file , however, this is an error with the crmsvcutil,exe as I seem to remember running in to it when generating for a different project using a batch file. Deleting the extra definition takes care of it.

from dlab.xrm.xrmtoolboxtools.

daryllabar avatar daryllabar commented on May 13, 2024

Ok. That is what was causing my error then. Did you have a link or anything that documented the extra officedocument_documenttype generation?

from dlab.xrm.xrmtoolboxtools.

daryllabar avatar daryllabar commented on May 13, 2024

And the TFS is obviously a little buggy. Wish I had a better way to interact with it. Do you get the TFS error if you generate each type (Entities/Option Sets/Actions) one at a time?

from dlab.xrm.xrmtoolboxtools.

cruentusmors avatar cruentusmors commented on May 13, 2024

No I have not seen anything documented about the duplicate enum other than my experience. Deleting it allows it to compile but I do not use optionsets or, as far as I know, any of the crm features that use officedocument_documenttype so it might be a problem for someone else. I doubt it tho.

from dlab.xrm.xrmtoolboxtools.

daryllabar avatar daryllabar commented on May 13, 2024

for the mean time, you could specify to skip generation of that option set

from dlab.xrm.xrmtoolboxtools.

daryllabar avatar daryllabar commented on May 13, 2024

This has been fixed by the 2016.2.6.1 release:
https://github.com/daryllabar/DLaB.Xrm.XrmToolBoxTools/releases/tag/v2016.2.6.1

from dlab.xrm.xrmtoolboxtools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.