Results 1 to 8 of 8

Thread: Public property has multiple definitions with identical signatures

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2011
    Posts
    85

    Public property has multiple definitions with identical signatures

    Hi guys. I have a problem.

    Visual Basic gave me these errors:

    Code:
    Error	1	'Private Shared Sub AutoSaveSettings(sender As Object, e As System.EventArgs)' has multiple definitions with identical signatures.	C:\Documents and Settings\Catalin\my documents\visual studio 2010\Projects\Game OS 0.2\Game OS 0.2\My Project\Settings.Designer.vb	32	24	Game OS 0.2
    Error	2	'Public Shared ReadOnly Property Default As MySettings' has multiple definitions with identical signatures.	C:\Documents and Settings\Catalin\my documents\visual studio 2010\Projects\Game OS 0.2\Game OS 0.2\My Project\Settings.Designer.vb	40	41	Game OS 0.2
    Error	3	'Public Property shortcut1 As System.Drawing.Point' has multiple definitions with identical signatures.	C:\Documents and Settings\Catalin\my documents\visual studio 2010\Projects\Game OS 0.2\Game OS 0.2\My Project\Settings.Designer.vb	60	25	Game OS 0.2
    Error	4	'Public Property shortcut2 As System.Drawing.Point' has multiple definitions with identical signatures.	C:\Documents and Settings\Catalin\my documents\visual studio 2010\Projects\Game OS 0.2\Game OS 0.2\My Project\Settings.Designer.vb	72	25	Game OS 0.2
    Error	5	'Public Property shortcut3 As System.Drawing.Point' has multiple definitions with identical signatures.	C:\Documents and Settings\Catalin\my documents\visual studio 2010\Projects\Game OS 0.2\Game OS 0.2\My Project\Settings.Designer.vb	84	25	Game OS 0.2
    Error	6	'Public Property shortcut4 As System.Drawing.Point' has multiple definitions with identical signatures.	C:\Documents and Settings\Catalin\my documents\visual studio 2010\Projects\Game OS 0.2\Game OS 0.2\My Project\Settings.Designer.vb	96	25	Game OS 0.2
    Error	7	'Public Property shortcut5 As System.Drawing.Point' has multiple definitions with identical signatures.	C:\Documents and Settings\Catalin\my documents\visual studio 2010\Projects\Game OS 0.2\Game OS 0.2\My Project\Settings.Designer.vb	108	25	Game OS 0.2
    Error	8	'Public Property shortcut6 As System.Drawing.Point' has multiple definitions with identical signatures.	C:\Documents and Settings\Catalin\my documents\visual studio 2010\Projects\Game OS 0.2\Game OS 0.2\My Project\Settings.Designer.vb	120	25	Game OS 0.2
    Error	9	'Public Property shortcut7 As System.Drawing.Point' has multiple definitions with identical signatures.	C:\Documents and Settings\Catalin\my documents\visual studio 2010\Projects\Game OS 0.2\Game OS 0.2\My Project\Settings.Designer.vb	132	25	Game OS 0.2
    Error	10	'Public Property shortcut8 As System.Drawing.Point' has multiple definitions with identical signatures.	C:\Documents and Settings\Catalin\my documents\visual studio 2010\Projects\Game OS 0.2\Game OS 0.2\My Project\Settings.Designer.vb	144	25	Game OS 0.2
    Error	11	'Public Property shortcut9 As System.Drawing.Point' has multiple definitions with identical signatures.	C:\Documents and Settings\Catalin\my documents\visual studio 2010\Projects\Game OS 0.2\Game OS 0.2\My Project\Settings.Designer.vb	156	25	Game OS 0.2
    Error	12	'Public Property shortcut10 As System.Drawing.Point' has multiple definitions with identical signatures.	C:\Documents and Settings\Catalin\my documents\visual studio 2010\Projects\Game OS 0.2\Game OS 0.2\My Project\Settings.Designer.vb	168	25	Game OS 0.2
    Error	13	'Public Property shortcut11 As System.Drawing.Point' has multiple definitions with identical signatures.	C:\Documents and Settings\Catalin\my documents\visual studio 2010\Projects\Game OS 0.2\Game OS 0.2\My Project\Settings.Designer.vb	180	25	Game OS 0.2
    Error	14	Attribute 'CompilerGeneratedAttribute' cannot be applied multiple times.	C:\Documents and Settings\Catalin\my documents\visual studio 2010\Projects\Game OS 0.2\Game OS 0.2\My Project\Settings1.Designer.vb	17	6	Game OS 0.2
    Error	15	Attribute 'GeneratedCodeAttribute' cannot be applied multiple times.	C:\Documents and Settings\Catalin\my documents\visual studio 2010\Projects\Game OS 0.2\Game OS 0.2\My Project\Settings1.Designer.vb	18	6	Game OS 0.2
    Error	16	Attribute 'EditorBrowsableAttribute' cannot be applied multiple times.	C:\Documents and Settings\Catalin\my documents\visual studio 2010\Projects\Game OS 0.2\Game OS 0.2\My Project\Settings1.Designer.vb	19	6	Game OS 0.2
    Error	17	'defaultInstance' is already declared as 'Private Shared defaultInstance As MySettings' in this class.	C:\Documents and Settings\Catalin\my documents\visual studio 2010\Projects\Game OS 0.2\Game OS 0.2\My Project\Settings1.Designer.vb	23	24	Game OS 0.2
    Error	18	'addedHandler' is already declared as 'Private Shared addedHandler As Boolean' in this class.	C:\Documents and Settings\Catalin\my documents\visual studio 2010\Projects\Game OS 0.2\Game OS 0.2\My Project\Settings1.Designer.vb	27	20	Game OS 0.2
    Error	19	'addedHandlerLockObject' is already declared as 'Private Shared addedHandlerLockObject As Object' in this class.	C:\Documents and Settings\Catalin\my documents\visual studio 2010\Projects\Game OS 0.2\Game OS 0.2\My Project\Settings1.Designer.vb	29	20	Game OS 0.2
    Error	20	'Settings' is ambiguous between declarations in Modules 'Game_OS_0._2.My.MySettingsProperty' and 'Game_OS_0._2.My.MySettingsProperty'.	C:\Documents and Settings\Catalin\my documents\visual studio 2010\Projects\Game OS 0.2\Game OS 0.2\My Project\Settings1.Designer.vb	34	13	Game OS 0.2
    Error	21	module 'MySettingsProperty' and module 'MySettingsProperty', declared in 'C:\Documents and Settings\Catalin\my documents\visual studio 2010\Projects\Game OS 0.2\Game OS 0.2\My Project\Settings.Designer.vb', conflict in namespace 'My'.	C:\Documents and Settings\Catalin\my documents\visual studio 2010\Projects\Game OS 0.2\Game OS 0.2\My Project\Settings1.Designer.vb	196	19	Game OS 0.2
    I use System.Drawing.Point to save locations of my "icons" (picturebox, it can moved!)...
    I have 11 settings:

    shortcut1
    shortcut2
    shortcut3
    shortcut4
    shortcut5
    shortcut6
    shortcut7
    shortcut8
    shortcut9
    shortcut10
    shortcut11

    One for each icon....
    I work 2 days at the program and 10 minutes ago gave me this error...
    What should I do ?
    Please help me....

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Public property has multiple definitions with identical signatures

    It looks like your Settings designer code file has been duplicated somehow. Notice the error messages refer to two file paths:

    C:\Documents and Settings\Catalin\my documents\visual studio 2010\Projects\Game OS 0.2\Game OS 0.2\My Project\Settings.Designer.vb
    C:\Documents and Settings\Catalin\my documents\visual studio 2010\Projects\Game OS 0.2\Game OS 0.2\My Project\Settings1.Designer.vb

    I'm guessing that if you delete that Settings1 file then you should be alright. It would be interesting to know whether this was something you did by accident or it was due to a glitch in VS.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    PowerPoster
    Join Date
    Mar 2002
    Location
    UK
    Posts
    4,780

    Re: Public property has multiple definitions with identical signatures

    Maybe it was a copy and paste, which does change the name of the file, but not the class name in the file.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Sep 2011
    Posts
    85

    Re: Public property has multiple definitions with identical signatures

    I moved out Settings1.designer.vb of My Project folder and then vb gave me this error:

    Code:
    Error	1	Unable to open module file 'C:\Documents and Settings\Catalin\my documents\visual studio 2010\Projects\Game OS 0.2\Game OS 0.2\My Project\Settings1.Designer.vb': The system cannot find the file specified. 	C:\Documents and Settings\Catalin\my documents\visual studio 2010\Projects\Game OS 0.2\Game OS 0.2\My Project\Settings1.Designer.vb	1	1	Game OS 0.2

  5. #5
    PowerPoster
    Join Date
    Mar 2002
    Location
    UK
    Posts
    4,780

    Re: Public property has multiple definitions with identical signatures

    Did you move it out in windows explorer, thus not telling VS that the file should not exist? You should change files through the editor, or it will believe that it should still exist.

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Sep 2011
    Posts
    85

    Re: Public property has multiple definitions with identical signatures

    How I can change files through the editor ?

    If i move out Settings and Settings1 , visual basic don't gave me any error....
    It would be better to delete definitive Settings1 and Settings and create new settings ?

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Sep 2011
    Posts
    85

    Re: Public property has multiple definitions with identical signatures

    Quote Originally Posted by Stunt3r View Post
    How I can change files through the editor ?

    If i move out Settings and Settings1 , visual basic don't gave me any error....
    It would be better to delete definitive Settings1 and Settings and create new settings ?
    It works.... Would be a problem if i do that ?

  8. #8
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Public property has multiple definitions with identical signatures

    You manage the project in the Solution Explorer. That's where you add items and that's where you remove items. Sometimes you may need to click the Show All Files button to be able to see the file of interest.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width