Comments (9)
when you say "throws an error", is that displayed in the output, or where do you see it?
from dlab.xrm.xrmtoolboxtools.
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.
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.
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.
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.
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.
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.
for the mean time, you could specify to skip generation of that option set
from dlab.xrm.xrmtoolboxtools.
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)
- Handle Xml File Formatting
- Fails to update Plugin Step Image
- Implement Retry Logic
- IEnumerable Activity Party Typing Bug (again) HOT 4
- EBG V2 Generation Error: Microsoft.Xrm.Sdk.PreferredSolutionDetails is not available HOT 10
- Should be possible to specify language to use HOT 2
- Allow to override Entity Names
- Add a default Messages Whitelist
- State Name is incorrect when using Entity Class Name Overrides
- 'Upgraded' v1settings files are missing some options in v2 HOT 3
- Cannot implicitly convert type ...StatusCode to 'Microsoft.Xrm.Sdk.OptionSetValue' HOT 3
- Fix Ordering of local Enums
- Error with StateCode when overriding EntityName
- Alternate Keys aren't ordered
- Allow for Enum Name Replacement strings
- Add a Search Box for the Properties Grid
- Connection Record1ObjectTypeCode and Connection_Record2ObjectTypeCode Are noisy between Environments HOT 2
- Seeing default settings helps us rookies HOT 2
- "_" underscore is removed from OptionSet Names? HOT 2
- Early Bound Generator V2 - Error generating classes HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dlab.xrm.xrmtoolboxtools.