Public Sub New() has multiple definitions with identical signatures error after converting website project to Web Application

Last post 10-26-2009 5:57 PM by Vorlosha. 2 replies.

Sort Posts:

  • Public Sub New() has multiple definitions with identical signatures error after converting website project to Web Application

    06-15-2009, 3:18 AM
    • Member
      point Member
    • samba007
    • Member since 06-15-2009, 7:13 AM
    • Posts 2

    I have converted a Website project to web Application. After converstion and during deployment I am getting loads of errors saying

    Public Sub New() has multiple definitions with identical signatures.
    Error 26 'lbtnConvertor' is already declared as 'Protected Dim WithEvents lbtnConvertor As System.Web.UI.WebControls.LinkButton' in this class.
    Standby' is already declared as 'Private Const Standby As String = "Standby"' in this class. etc

    Can any one plz tell what is going wrong. How can I solve this.

    kind Regards


     

  • Re: Public Sub New() has multiple definitions with identical signatures error after converting website project to Web Application

    06-15-2009, 5:22 AM
    Answer
    • All-Star
      46,040 point All-Star
    • joteke
    • Member since 06-16-2002, 3:24 PM
    • Kyro, Finland
    • Posts 6,879
    • ASPInsiders
      Moderator
      TrustedFriends-MVPs

    Hi,

    converting to web application moves control declarations such as

    Protected Dim WithEvents lbtnConvertor As System.Web.UI.WebControls.LinkButton

    to the aspx .designer files. And if they are still present on your code-behind class, it can cause this error (e.g you can remove them if you have designer file in place).

    One question, did you do "Convert to Web Application" (right-click in solution explorer the root node of the project)?

    Thanks,

    Teemu Keiski
    Finland, EU
  • Re: Public Sub New() has multiple definitions with identical signatures error after converting website project to Web Application

    10-26-2009, 5:57 PM
    • Member
      29 point Member
    • Vorlosha
    • Member since 07-25-2007, 5:07 AM
    • Moscow
    • Posts 188

    I did not convert my website from older versions of .NET framework.

     

    I created new! .NET 4.0   web application.

    And now I get the same error when I just created empty dataset!

    How can I solve it?

     

    Compilation Error

    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: BC30269: 'Public Sub New()' has multiple definitions with identical signatures.

    Source Error:

    Line 30:     <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(),  _
    Line 31:      Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")>  _
    Line 32:     Public Sub New()
    Line 33:         MyBase.New
    Line 34:         Me.BeginInit

Page 1 of 1 (3 items)