dcsimg
Results 1 to 9 of 9

Thread: [RESOLVED] multiple definitions with identical signatures

  1. #1

    Thread Starter
    Lively Member viper5646's Avatar
    Join Date
    Feb 2009
    Location
    kitchener Ontario
    Posts
    87

    Resolved [RESOLVED] multiple definitions with identical signatures

    Hi All
    My Project has been working fine, until I changed the startup application.
    After changing the startup application I received the followin errors.
    1-Protected Overrides Sub OnCreateMainForm()' has multiple definitions with identical signatures.
    2- Multiple definitions with identical signatures.
    I also noticed there are two Application.designer files (Application.designer and Application1.designer) in myProject folder.
    I have tried to remame the desiner1 and reran the the application, the error was it couldnt find the file.
    Thanks in advanced.

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    104,709

    Re: multiple definitions with identical signatures

    Renaming the file doesn't do anything useful if you don't rename the type declared within it. I would suggest that you take a backup of the project first and then delete that extra designer code file. If everything goes back to normal, you can delete the backup.

    Hopefully this whole episode will encourage you to take regular backups if you're not already. Better still, use a source control system.

  3. #3

    Thread Starter
    Lively Member viper5646's Avatar
    Join Date
    Feb 2009
    Location
    kitchener Ontario
    Posts
    87

    Re: multiple definitions with identical signatures

    Thanks jmcilhinney for your reply.
    I went to a back up a day prior the issue, it only had one Application.designer file.
    I compared them both and the are the same.
    The only reason I had renamed the Application1.designer was hoping if visual studio wouldn't find it and would only use the Application.designer and would keep on going.
    Since my previous backup only has one Application.designer is there away to have VS ignore the second one.

  4. #4
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    104,709

    Re: multiple definitions with identical signatures

    Quote Originally Posted by viper5646 View Post
    Since my previous backup only has one Application.designer is there away to have VS ignore the second one.
    Why try to ignore it when you can delete it?

  5. #5

    Thread Starter
    Lively Member viper5646's Avatar
    Join Date
    Feb 2009
    Location
    kitchener Ontario
    Posts
    87

    Re: multiple definitions with identical signatures

    I went onto the file explorer and deleted the file, opened VS and when running the project I received an error message that Application1.designer could not be found.
    Unless there is a way to exclude it from the project.

  6. #6
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    104,709

    Re: multiple definitions with identical signatures

    Where do you add new items to your project? In the Solution Explorer. Where do you think you ought to remove them?

  7. #7

    Thread Starter
    Lively Member viper5646's Avatar
    Join Date
    Feb 2009
    Location
    kitchener Ontario
    Posts
    87

    Re: multiple definitions with identical signatures

    I found both .designer files in the Solution explorer.
    Deleted the application1.designer from the project, ran the application and it worked fine with no errors.
    Went back to the project properties changed the startup file, the Application1.designer was recreated and the error multiple definitions with identical signatures is back .
    I assume this is a VS bug.

  8. #8
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    104,709

    Re: multiple definitions with identical signatures

    Quote Originally Posted by viper5646 View Post
    I assume this is a VS bug.
    It certainly seems so but it's not one that I've ever seen before. I just tried doing that myself and there was no issue. If you're not using version 16.5.1 then you might want to update, in case it's something that has been fixed. I'd also suggest creating a new project and see if the same thing happens. Sometimes such odd behaviour can be due to project corruption rather than IDE corruption. If other projects are OK, you might want to create a new one and import all the items from the old one. If all projects are affected, you might try repairing your VS installation.

  9. #9

    Thread Starter
    Lively Member viper5646's Avatar
    Join Date
    Feb 2009
    Location
    kitchener Ontario
    Posts
    87

    Re: multiple definitions with identical signatures

    Thank you jmcilhinney
    I will try your sugestions.

Tags for this Thread

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width