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

33,233

Solution 1

Easy!

  1. Right-click your project and select "Unload Project"

  2. Right-click again and "Edit your_project.csproj"

  3. Search for the duplicate files mentioned in the error message and remove them.

  4. Save and close.

  5. Right-click to choose "Reload Project" view image

Solution 2

I had this problem recently, and I think I figured out my particular situation, so maybe it will help you.

I had used the Visual Studio IDE to copy an existing form (let's call it Form1). I pasted it into the same project (it arrived as Copy of Form1)

I then renamed that new copy to Form2.

It took me a while, but I eventually found that the IDE had renamed both Form1 and Copy of Form1 to Form2

The filenames were correct... just the actual classes inside were named.

I manually renamed the original back to the proper class and voila, it worked.

Solution 3

I had the same error and In my case, i fixed this problem like the follow.

enter image description here

Down the highlighted part was another file some_name_not_equal_to_main.resx and after removing it, my program start to run normally.

Hope this helped you.

Solution 4

After renaming the file, rename the class and all the constructors inside the new created file. By default, the name of the file changes but the name of the classes inside them doesn't change. So do the needful.

Solution 5

I just had this same problem. Not sure of exact semantics, but it is related to maintaining multiple files as partial of 'Main' form class.

In my case, the IDE got it into it's head to add form initialization routines to one of the partial class files that wasn't the 'main' form.

That created two 'main' forms and the conflict.

Simply finding the added init functions and removing them, along with the associated .resx file, fixed the problem.

Share:
33,233
Jitendra Kumar Rajbhar
Author by

Jitendra Kumar Rajbhar

Updated on April 07, 2021

Comments

  • Jitendra Kumar Rajbhar
    Jitendra Kumar Rajbhar about 3 years

    While compiling my Visual Studio C# project, i am getting the following error:

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

    However i have searched a lot on internet but none of the solution worked for me.

    I tried to delete the form and re-added it into the project, but it doesn't work for me.

    I only have one resx file.

    I am using VS 2010.

    Also, i tried the following solutions but it not worked for me:

    1. https://stackoverflow.com/a/7928191/2074603
    2. https://stackoverflow.com/a/10066009