How to solve a “duplicate items” error in the “Resources” parameter

前端 未结 6 2089
广开言路
广开言路 2021-01-18 02:21

While working on my project, I got this error:

The item \"...\" was specified more than once in the \"Resources\" parameter. Duplicate items are not

相关标签:
6条回答
  • 2021-01-18 02:39

    This happen when you change name form it duplicate resources file of form.

    You open old copy all items and paste to new resource then delete old res file.

    Rebuild Solutions.

    0 讨论(0)
  • 2021-01-18 02:45

    To fix the issue I browsed to [obj > Debug] and [obj > release] and deleted any files which referenced the word resources. After this, my project built successfully.

    0 讨论(0)
  • 2021-01-18 02:46

    I guess the item "..." is a form, then:

    1. Remove the "..." form from recent solution (and save somewhere)
    2. Recompile the project
    3. Save the solution
    4. Restart the solution
    5. Add the "..." form
    6. Recompile
    0 讨论(0)
  • 2021-01-18 02:47

    I received this error after I copy and paste Form1 (for example) in my project.I rename Copy in Form2, but Form2 had next line in *.cs "public partial class Form1". As i understand after copying class name didn't change. I resolved this problem by adding a new form and copying there controls from my old form. The Old form was deleted.

    0 讨论(0)
  • 2021-01-18 02:57

    A slightly simpler way ..

    1. Select the form and then right-click and select "Exclude from Project".
    2. Clean and Recompile project
    3. Select the "Show all files" icon on Solution toolbar to show the excluded form files.
    4. Select the form and then right-click and select "Include in Project" to add it back.
    5. Recompile project
    6. Save All to ensure that project file is saved.

    No need to restart Solution or move the form.

    0 讨论(0)
  • 2021-01-18 02:59

    Create a backup of both the .cs and .designer.cs file which is giving the error and then delete that file from the project. Rebuild the solution and then copy back both .cs and .designer.cs files. Finally, rebuild the solution again.

    0 讨论(0)
提交回复
热议问题