473,766 Members | 2,064 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What does this error mean?

I copied and paste a form in my solution and renamed the copy (all done in
the solution explorer) and now, when I compile the app, I get the following
error:

-----------
The item "obj\Debug\Sing leInstance.Unlo ckDlg.resources " was specified more
than once in the "Resources" parameter. Duplicate items are not supported
by the "Resources" parameter. SingleInstance
-----------

I have no idea what it's trying to tell me and even less idea how to fix
this. Any suggestions? Double clicking on the error takes me nowhere, so I
take it it's a build error, but where to look?

If I remove the form from the solution, it compiles Ok, but that's somewhat
unhelpful since I need the form!! I'm using VS2005/C#.

Thanks
Steve
Sep 26 '06 #1
4 12349
Hi Steve,

I suspect that you only renamed the .cs file and its class. You must also rename the related files (click the plus sign in solution
explorer) and the partial class in .designer.cs.

--
Dave Sexton

"Steve Barnett" <no****@nodomai n.comwrote in message news:eZ******** ******@TK2MSFTN GP02.phx.gbl...
>I copied and paste a form in my solution and renamed the copy (all done in the solution explorer) and now, when I compile the app,
I get the following error:

-----------
The item "obj\Debug\Sing leInstance.Unlo ckDlg.resources " was specified more than once in the "Resources" parameter. Duplicate
items are not supported by the "Resources" parameter. SingleInstance
-----------

I have no idea what it's trying to tell me and even less idea how to fix this. Any suggestions? Double clicking on the error takes
me nowhere, so I take it it's a build error, but where to look?

If I remove the form from the solution, it compiles Ok, but that's somewhat unhelpful since I need the form!! I'm using VS2005/C#.

Thanks
Steve

Sep 26 '06 #2
Actually, it's turned out to be worse than that - I feel so stupid for not
realising what went on.

Having copied the form (and got a bunch of files called Copy of Formx) I
renamed the form in Solution Explorer. It very kindly went through my code
and refactored the lot, including the original form so, while the file names
were different, the class names in the source were the same.

I think I just went off refactoring.

Thanks
Steve
"Dave Sexton" <dave@jwa[remove.this]online.comwrote in message
news:eY******** ******@TK2MSFTN GP04.phx.gbl...
Hi Steve,

I suspect that you only renamed the .cs file and its class. You must also
rename the related files (click the plus sign in solution explorer) and
the partial class in .designer.cs.

--
Dave Sexton

"Steve Barnett" <no****@nodomai n.comwrote in message
news:eZ******** ******@TK2MSFTN GP02.phx.gbl...
>>I copied and paste a form in my solution and renamed the copy (all done in
the solution explorer) and now, when I compile the app, I get the
following error:

-----------
The item "obj\Debug\Sing leInstance.Unlo ckDlg.resources " was specified
more than once in the "Resources" parameter. Duplicate items are not
supported by the "Resources" parameter. SingleInstance
-----------

I have no idea what it's trying to tell me and even less idea how to fix
this. Any suggestions? Double clicking on the error takes me nowhere, so
I take it it's a build error, but where to look?

If I remove the form from the solution, it compiles Ok, but that's
somewhat unhelpful since I need the form!! I'm using VS2005/C#.

Thanks
Steve


Sep 26 '06 #3

"Steve Barnett" <no****@nodomai n.comwrote in message
news:eZ******** ******@TK2MSFTN GP02.phx.gbl...
>I copied and paste a form in my solution and renamed the copy (all done in
the solution explorer) and now, when I compile the app, I get the following
error:

-----------
The item "obj\Debug\Sing leInstance.Unlo ckDlg.resources " was specified more
than once in the "Resources" parameter. Duplicate items are not supported
by the "Resources" parameter. SingleInstance
-----------

I have no idea what it's trying to tell me and even less idea how to fix
this. Any suggestions? Double clicking on the error takes me nowhere, so I
take it it's a build error, but where to look?

If I remove the form from the solution, it compiles Ok, but that's
somewhat unhelpful since I need the form!! I'm using VS2005/C#.

Thanks
Steve
It would appear that when you copy and paste a form, then rename the copy,
that VS 2005 inappropriately alters code in <first form name>.cs and <first
form name>Designer.c s.

I'd not seen this behavior, as I don't copy forms, but I'll bet it has
already been reposted as a bug (Somebody will correct me if I'm wrong, I'm
sure :) ).
To fix it, edit the files cited above, which incorrectly use the name of
your new, renamed form, to use the original form name. Your project should
then compile.

--
Peter [MVP Visual Developer]
Jack of all trades, master of none.
Sep 26 '06 #4

"pvdg42" <pv****@newsgro ups.nospamwrote in message
news:up******** ******@TK2MSFTN GP03.phx.gbl...
>
"Steve Barnett" <no****@nodomai n.comwrote in message
news:eZ******** ******@TK2MSFTN GP02.phx.gbl...
>>I copied and paste a form in my solution and renamed the copy (all done in
the solution explorer) and now, when I compile the app, I get the
following error:

-----------
The item "obj\Debug\Sing leInstance.Unlo ckDlg.resources " was specified
more than once in the "Resources" parameter. Duplicate items are not
supported by the "Resources" parameter. SingleInstance
-----------

I have no idea what it's trying to tell me and even less idea how to fix
this. Any suggestions? Double clicking on the error takes me nowhere, so
I take it it's a build error, but where to look?

If I remove the form from the solution, it compiles Ok, but that's
somewhat unhelpful since I need the form!! I'm using VS2005/C#.

Thanks
Steve
It would appear that when you copy and paste a form, then rename the copy,
that VS 2005 inappropriately alters code in <first form name>.cs and
<first form name>Designer.c s.

I'd not seen this behavior, as I don't copy forms, but I'll bet it has
already been reposted as a bug (Somebody will correct me if I'm wrong, I'm
sure :) ).
To fix it, edit the files cited above, which incorrectly use the name of
your new, renamed form, to use the original form name. Your project should
then compile.

--
Peter [MVP Visual Developer]
Jack of all trades, master of none.
At some stage I want to turn this form in to a template, so the problem
should go away and I'll never need to copy the form again. In the short
term, I needed a copy for testing purposes. It's working now I've edited the
"other" form.

Net job is to learn how to create template forms!! Oh joy, another thing to
learn before I start the "real" development!

Thanks
Steve
Sep 26 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

72
5890
by: E. Robert Tisdale | last post by:
What makes a good C/C++ programmer? Would you be surprised if I told you that it has almost nothing to do with your knowledge of C or C++? There isn't much difference in productivity, for example, between a C/C++ programmers with a few weeks of experience and a C/C++ programmer with years of experience. You don't really need to understand the subtle details or use the obscure features of either language
6
23623
by: WindAndWaves | last post by:
Hi Folks I have inhereted a script that I understand reasonably well, I just do not understand !/^\d+$/.test(el.value) what the hell does that mean? Below is the script (there are really three and they validate a four items
121
10150
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode support IDEs are DreamWeaver 8 and Zend PHP Studio. DreamWeaver provides full support for Unicode. However, DreamWeaver is a web editor rather than a PHP IDE. It only supports basic IntelliSense (or code completion) and doesn't have anything...
13
5053
by: Jason Huang | last post by:
Hi, Would someone explain the following coding more detail for me? What's the ( ) for? CurrentText = (TextBox)e.Item.Cells.Controls; Thanks. Jason
669
26185
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic paper written on this subject. On the Expressive Power of Programming Languages, by Matthias Felleisen, 1990. http://www.ccs.neu.edu/home/cobbe/pl-seminar-jr/notes/2003-sep-26/expressive-slides.pdf
13
520
by: Protoman | last post by:
I'm getting an error: 10 C:\Dev-Cpp\Enigma.cpp no match for 'operator<' in 'i < (+cleartext)->std::basic_string<_CharT, _Traits, _Alloc>::end ()' Code: Enigma.hpp -------------------------- #pragma once
5
468
by: prabu | last post by:
Hi all, I want to know, what does the value of the array in the following statement mean and How to print the content of the array SMB_Negotiate using printf? unsigned char SMB_Negotiate = "\x00\x00\x00\x85\xFF\x53\x4D\x42\x72\x00\x00\x00\x00\x18\x53\xC8"
6
2431
by: Bint | last post by:
I'm getting this returned from a PHP script. What does this mean? <b>Parse error</b>: syntax error, unexpected ')', expecting T_PAAMAYIM_NEKUDOTAYIM in <b>/ho Thanks B
2
13069
by: Lambda | last post by:
The code is simple: // Token.h #ifndef TOKEN_H #define TOKEN_H #include <vector> #include <string> class Token
5
13497
by: =?GB2312?B?17/HvyBaaHVvLCBRaWFuZw==?= | last post by:
Hi, I would like to have someone comments on what's the best practice defining error codes in C. Here's what I think: solution A: using enum pros: type safe. better for debug (some debugger will show the name not only the value) cons: enum can not be forward declared which makes all error codes
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8833
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7381
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6651
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5279
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3929
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.