Skip to content

When running CodeDefiner during a version upgrade, the error "same key has already been added" occurred

Answer

The ID of a message file in the App_Data\Displays folder is duplicated. Please do not overwrite the old version folder with the new version folder.


Overview

If the error "same key has already been added" occurs when running CodeDefiner during the version upgrade process, it is caused by duplicate IDs in the message files in the App_Data\Displays folder.

<ERROR> Starter.Main: UnhandledException : An item with the same key has already been added. Key: SiteXX.json
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
~The rest is omitted~

Instead of overwriting the old version folder, rename it to another folder name as a backup and then deploy the new version.

Pleasanter Version Upgrade Procedure (Azure App Service)
Pleasanter Version Upgrade Procedure (Linux)
Pleasanter Version Upgrade Procedure (Windows)