Duplicate Item "Resources" parameter error

I have a partial class in two files that inherit from a form. I changed a property on the form in both Form Designer Files and now keep getting this error message:

The item "obj\Debug\Game.App.resources" was specified more than once in the "Resources" parameter. Duplicate items are not supported by the "Resources" parameter.

Can anyone help I only changed the FormBorderStyle and already changed it back, but keep getting the error message.

Thank You



Answer this question

Duplicate Item "Resources" parameter error

  • JurgenT

    Thanks for the heads up with this. I recently noticed the new partial class support and how it helps to separate classes into several physical files - great!

    Using the <DependentUpon> node in the project XML I was able to add additional files for a form and split functionality into these files to reduce the volume of code within the one file.

    To push the envelope I created two forms, I then made one of the forms a private inner classes within the other 'parent' form.

    viz.
    namespace TestApp1 {
    public partial class Form1: Form {
    private partial class MyDialog : Form {
    public MyDialog() {
    InitializeComponent();
    }
    }
    }
    }

    Now when I compile I get this error:

    The item "obj\Debug\TestApp1.Form1.resources" was specified more than once in the "Resources" parameter. Duplicate items are not supported by the "Resources" parameter. TestApp1

    If I modify the form as follows...

    namespace TestApp1 {
    //public partial class Form1: Form {
    private partial class MyDialog : Form {
    public MyDialog() {
    InitializeComponent();
    }
    }
    //}
    }


    All is well. Is this supposed to work and I have missed something or am I pushing my luck :-)

    Thanks in advance for any assistance!

    Andrew.

  • Augustinscuba

    This usually happens when you copy a form without renaming types. Check the naming in the cs files and rename duplicate classes.

  • dinh107

    You can open the project file. There will be a duplicate entry for the .cs, .designer.cs, and .resx file for file

    It happened to me when I overwrote a control with another abd built it.


  • jhcorey

    Nevermind, I just combined the two files and it solved the problem.
  • Duplicate Item "Resources" parameter error