KeyNotFoundException: The given key 'value' was not present in the dictionary (v2023)

Still the issue appears in generated code (Lang.cs) , not in user code:

KeyNotFoundException: The given key 'value' was not present in the dictionary.

ASPNETMaker2023.Models.EvOLT_2_0+Lang+<>c.<PhrasesToJson>b__36_1(KeyValuePair<string, object> kvp) in Lang.cs
+
                .ToDictionary(kvp => kvp.Key, kvp => (string)kvp.Value["value"]);
System.Linq.Enumerable.ToDictionary<TSource, TKey, TElement>(IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey> comparer)
System.Linq.Enumerable.ToDictionary<TSource, TKey, TElement>(IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector)
  1. Make sure that you have deleted all files/folders in the destination folder manually first, and then regenerate all files and folders again.
  2. This may be related to your other topic: https://discourse.hkvstore.com/t/table-names-with-dots-v2023/7271/1

OK, problem is in the translation file. Switching the default language to English, app works with no issue.

Any idea how to capture the exact phrase which is failing?
Ay some point I have identified a phrase which was missing the “value” attribute, but that was not an issue on an another project which renders ok my translated language.

You can always turn on Tools → Advanced Settings → Debug to find more info.

It was from the phrase with missing value attribute, in translation file.
An idea to update the PhrasesToJson method in Lang.js, to filter out pharses without “value”:

        // Output phrases as JSON
        public async Task PhrasesToJson(dynamic phrases)
        {
            Dictionary<string, string> dict = ((Dictionary<string, dynamic>)phrases)
                .Where(kvp => kvp.Value["value"] != null)
		.ToDictionary(kvp => kvp.Key, kvp => (string)kvp.Value["value"]);
			
            foreach (var (key, value) in dict) {
                await _writer.WritePropertyNameAsync(key);
                await _writer.WriteValueAsync(value);
            }
        }

Thanks for your time!