Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, July 1, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Web Forums - SalesLogix Web Platform & Application Architect
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Platform & Application Architect | New ThreadView:  Search:  
 Author  Thread: An item with the same key has already been added - After installing bundle.
Tony Joanes
Posts: 71
 
An item with the same key has already been added - After installing bundle.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Feb 10 11:11 AM
I am getting the following error when building my project. I installed a bundle from a project differences manifest using my development project to upgrade another project. I can't seem to get rid of this error now.

Has anyone come across this before?

ERROR -
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 Sage.Platform.Orm.Entities.CodeSnippetLibraryBase.InitializeLibrary()
at Sage.Platform.Orm.Entities.CodeSnippetLibraryBase.CompileSnippetAssembly(Boolean force)
at Sage.Platform.Orm.Entities.CodeSnippetManager.BuildAllLibraries(Boolean forceOverwrite)
at Sage.Platform.AdminModule.AdminModuleInit.GenerateCodeSnippetLibraries(BuildType buildType)
at Sage.Platform.AdminModule.AdminModuleInit.BuildWebObjectsImpl(OperationStatus op)
[Reply][Quote]
Lane
Posts: 121
 
Re: An item with the same key has already been added - After installing bundle.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Feb 10 1:54 PM
Typically you get this by copying a form and renaming it then adding it back into the vfs.
This works until you bundle or package the changes. Here is why...
Inside the form is a unique ID, and this ID is added to the modelindex.xml
Modelindex can not process the duplicate.

Bundles do bad things and as well as aa.

To fix, generate a few forms, strip the id's the delete them, from the aa deleted bin too.
now put the id's into the duplicated forms in source vfs, re-bundle and it should work.
[Reply][Quote]
Tony Joanes
Posts: 71
 
Re: An item with the same key has already been added - After installing bundle.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Mar 10 6:17 AM
Thanks for the tip!

Where are you finding the ID's from exactly?

The error message didn't really help with identifying which forms had the same id's, have you any tips on how to go about finding this out?

Many thanks!
[Reply][Quote]
Lane
Posts: 121
 
Re: An item with the same key has already been added - After installing bundle.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Mar 10 8:18 AM
I found them when i tried to apply a bundle and since the form id becomes the tree node index, the duplicate id turned into only one node so only one of the forms showed (I had duplicated 4 forms). In simpler words, generate a Difference Manifest (ON SCREEN, once saved and reloaded it'll drop the duplicates). And compare that to the same view after a saving/load. The duplicates will show in one and not the other.

A better option is to load the modelindex.xml into a db and do a group by id, having count>2.
[Reply][Quote]
Tony Joanes
Posts: 71
 
Re: An item with the same key has already been added - After installing bundle.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Mar 10 4:14 AM
I couldn't find any duplicated ID's in the modelindex.xml file? Any ideas?
[Reply][Quote]
Lane
Posts: 121
 
Re: An item with the same key has already been added - After installing bundle.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Mar 10 10:02 AM
in the source or target, they won't be in the target. And, might not get into the source ... (too specific to AA to guess) I'd need to regenerate the problem to target it any further. Sorry
[Reply][Quote]
Tony Joanes
Posts: 71
 
Re: An item with the same key has already been added - After installing bundle.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Mar 10 11:10 AM
Thanks for your help with this issue.

Im still working on it, laptopt hasn't been thrown through window yet but the days not over!
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 7/1/2025 12:40:51 AM