Showing posts with label Deployment. Show all posts
Showing posts with label Deployment. Show all posts

CRM 2011. Solution import fails with error "An item with the same key has already been added."

Today I was helping to resolve following error during solution import: "An item with the same key has already been added".

I took traces and found following:

EntityService.Update caught exception: System.ArgumentException: An item with the same key has already been added.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Microsoft.Crm.Metadata.OptionSetService.GetExistingAttributePicklistInternal(Guid optionSetId, OptionSetType optionSetType, Nullable`1 optionValue, ISqlExecutionContext context)

Method "GetExistingAttributePicklistInternal" is retrieving picklist values from CRM and adding these values to a dictionary. It means that you have a problem with CRM instance you are deploying solution into.

I didn't have a chance to find a way how to fix this issue. We decided to use another environment for now and successfully deployed our solution.

Introducing Visual Studio Add-On "Microsoft Dynamics CRM Web Resources Updater"

This add-on will be useful for each Microsoft Dynamics CRM Developer. It allows to initiate upload and publish process directly from Visul Studio. The main benefit is that web resources upload and publish process takes as little time as possible because add-on is only take care about web resources that are changed. It will help to speed up development and debugging processes by allowing you to focus on the code you are crating.

See full description here: http://happycrm.blogspot.ru/p/crm-publisher.html

If you have any issue or comment just write me in comments or you can also leave a feedback on Codeplex or Visual Stuio Gallery and I will fix it shortly.

Hope you will love this add-on.

Error during solution import: Your organization does not allow this type of workflow.

Today I faced following error during solution import:

This workflow cannot be created, updated or published because it was created outside the Microsoft Dynamics CRM Web application. Your organization does not allow this type of workflow.


There is simple solution. You should enable XAML workflows as described here: http://msdn.microsoft.com/en-us/library/8da8c71e-84af-441e-b99b-0b59399f10f6#enable_disable

You can also get this error if you import solution from CRM server which has higher rollup installed then on the target server.