VS2019 error: Unable to load project with duplicate project items: .... as Image and included as Image item type.

A copied vcc solution, the project cannot be loaded when opened, the error content is as follows,

error: Unable to load project with duplicate project items: res\POLYGON.png as Image and included as Image item type.
error: Unable to load project with duplicate project items: res\RECTANGLE.png as Image and included as Image item type.

Solution:

Right-click the project that cannot be loaded in vc and select "Edit <projectName>.vcxproj",

Find a duplicate line (in this project, as reported in the error message, an item named POLYGON.png was repeatedly loaded) delete these duplicate lines, save, and reload.

Guess you like

Origin blog.csdn.net/tanmx219/article/details/107911617