Harry
Harry

Reputation: 21

unable to compile the c#.net project ..getting error "resources was specified more than once "

The item "obj\Debug.resources" was specified more than once in the "Resources" parameter + c#.net

Upvotes: 0

Views: 3853

Answers (4)

Roy
Roy

Reputation: 648

Did you by any chance copy/paste a Form?

the error tells you there is more then 1 class in the project with the same name.

For the others: the problem is reproducable using the following steps:

  1. create a new smart device project.
  2. copy/paste Form1. (so Visual Studio creates the files "Copy of Form1.*)
  3. Build.

sure you don't have any duplicates?

Upvotes: 2

sashaeve
sashaeve

Reputation: 9607

Try to clean up the project and then rebuild it again.

Upvotes: 0

Adrian Fâciu
Adrian Fâciu

Reputation: 12552

If you don't have anything relevant in your resx files just delete them. VS will regenerate them and your project will compile. Do this only for the forms that you copy-pasted.

Upvotes: 1

Richard Anthony Hein
Richard Anthony Hein

Reputation: 10650

VS 2005?

See this: http://social.msdn.microsoft.com/forums/en-US/vbide/thread/4048e49f-3a6f-46ce-9efd-d046f7041e2e/

In your project file, if you open it in notepad, it will likely have the item listed twice. You can edit the project file or delete the resource file. If that doesn't help, also check the properties for your files, and make sure that they are correct, and have "Build Action" set to "Embedded Resource", "Copy to Output Directory" set to "Do not copy" for your resx files.

Upvotes: 0

Related Questions