The item obj\Debug\BookStore.MainForm.resources
was specified more than once in the Resources
parameter. Duplicate items are not supported by the Resources
parameter.
How do I fix this?
This error happened when you copy and paste a form in the 'Solution Explorer' pane. Then you change name of one forms. Visual studio give the same name for both and then, when you rename form, Visual Studio do some refactoring for you and rename Designer class for both forms (not only for new).
You can fix this two ways:
Close Microsoft Visual Studio, then browse to your project folder from external program (ex. Total Commander). Into the folder where both forms are defined you can see your form's .cs and .Designer.cs file. Open the .cs and .Designer.cs files for your form in a text editor. Find and replace every instance of the original form name with new name. And if you rename already rename some resources, check file for original form also (if they are only original form name but not anything for new form name). Then save all files, start Microsoft Visual Studio and rebuild your project.
You can try chcek and rename declaration for each occurance of original form name in new .cs and .Designer.cs files but try disable refactoring. If you already renamed new form, in .Designer.cs for old form you maybe see this:
namespace YourProjectNamespace
{
partial class NewFormName
{ .. }
You must rename NewFormName to OldFormName and when Visual Studio offer you a refactoring menu (small reg rectangle before last letter of renamed object) do not make anything.
This happened to me when I created a partial form class. When I unintentionally viewed it in Design mode it created a localized resx file for the new partial form. I deleted that resx file and that resolved it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With