BackgroundImage property flag error: "An item with the same key has already been added"

When I try to insert an image file into the BackgroundImage Panel property, I get this error:

An item with the same key has already been added.

What does it mean?

+3
source share
1 answer

As I mentioned in the commentary, a criminal is almost certainly a resource file for the form in question. Or you have already added the image file to another form control, in which case you need to select it from the list instead of adding a new copy of it. Or you somehow ended up with a damaged resource file. In this case, the easiest solution is to remove it and create a new IDE:

  • Solution Explorer expando .

  • : FormName.Designer.cs FormName.resx. .resx, , . , .

    Expand your form in the Solution Explorer, and delete the .resx file

  • Delete "", .

  • . "".

, . IDE , , , .

+5

Source: https://habr.com/ru/post/1793534/


All Articles