Getting an error while publishing the library - " System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary."

Hi All,

I am facing error when publishing a library. I validated the project before publishing then it didnt show any error. But while publishing it is showing as " System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary." error.

This error is not specific to any xaml file, i am confused how to resolve the issue.

I used analyze project option then the same error is showing up but not specific to any file:

I have published the same code with 2019.13 beta version then i didnt get this error. While publishing with 2019.10.3 Enterprise edition i am facing this issue.

Could any one help me in resolving the issue.

Regards,
Rajeswari

1 Like

Hi @Rajeswari24

Have you initialise the dictionary like new dictionary(of string,string)

Thanks
Ashwin S

Hi Ashwin,

Yeah i have initialized the dictionary like that in one of the xamls

Have you looked at your packages to see if any of them indicate they are not compatible with 19.10?

Hi @Rajeswari24, could you share with us the xaml in question?

I am extracting email and saving it into excel in table format(EmailDate And From And Subjecct)

I kept data type for “From” as Int32 in data table. As mail id was alphanumeric, it throws an error. Hence I have changed data type. I got warning “Data type has changed. All data from this column will be lost”. So I pressed “OK”. Now I am getting error " The given key is not present in dictionary".
Please guide me. What could be the reason of this error.