none
[debug] member names cannot be the same as their enclosing type

    Question

  • I dragged a user control to my ASP.NET website, and, noted the following compilation errors:

    Warning    1    Element 'Envelope' is not a known element. This can occur if there is a compilation error in the Web site, or the web.config file is missing.    c:\inetpub\wwwroot\Jon's Couch\Articles.aspx    27    10    http://localhost/Jon's Couch/

    Error    2    'Envelope': member names cannot be the same as their enclosing type    c:\inetpub\wwwroot\Jon's Couch\Envelope.ascx    1    1    http://localhost/Jon's Couch/

    Source code here .

    Visual Studio 2008

    Microsoft Visual Studio 2008
    Version 9.0.21022.8 RTM
    Microsoft .NET Framework
    Version 3.5 SP1

    Installed Edition: Professional

    Microsoft Visual Basic 2008   91605-270-9885354-60939
    Microsoft Visual Basic 2008

    Microsoft Visual C# 2008   91605-270-9885354-60939
    Microsoft Visual C# 2008

    Microsoft Visual C++ 2008   91605-270-9885354-60939
    Microsoft Visual C++ 2008

    Microsoft Visual Studio 2008 Tools for Office   91605-270-9885354-60939
    Microsoft Visual Studio 2008 Tools for Office

    Microsoft Visual Web Developer 2008   91605-270-9885354-60939
    Microsoft Visual Web Developer 2008

    Crystal Reports    AAJ60-G0MSA4K-68000CF
    Crystal Reports Basic for Visual Studio 2008


    Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB944899)   KB944899
    This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/944899.

    Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB945282)   KB945282
    This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/945282.

    Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB946040)   KB946040
    This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/946040.

    Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB946308)   KB946308
    This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/946308.

    Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB946344)   KB946344
    This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/946344.

    Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB946581)   KB946581
    This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/946581.

    Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB947171)   KB947171
    This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/947171.

    Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB947173)   KB947173
    This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/947173.

    Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB947180)   KB947180
    This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/947180.

    Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB947540)   KB947540
    This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/947540.

    Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB947789)   KB947789
    This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/947789.

    Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB948127)   KB948127
    This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/948127.

    Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB953256)   KB953256
    This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/953256.

    Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB971091)   KB971091
    This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/971091.

    Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB973674)   KB973674
    This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/973674.

    PowerCommands for Visual Studio 2008   1.0
    A set of power commands for Visual Studio 2008

    Update for Microsoft Visual Studio 2008 Professional Edition - ENU (KB972221)   KB972221
    This update is for Microsoft Visual Studio 2008 Professional Edition - ENU.
    If you later install a more recent service pack, this update will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/972221.

     

    Wednesday, September 01, 2010 8:58 PM

Answers

  • Hello slyth,

    Thanks for your thread and the detailed project to reproduce the issue!

    And yes, it is reproducable here.

    For warning 1, please:
    use
    <%@ Register src="~/Envelope.ascx" tagname="Envelope" tagprefix="uc1" %>
    instead of
    <%@ Register src="Envelope.ascx" tagname="Envelope" tagprefix="uc1" %>

    For error 2, please:
    use
    <asp:FormView ID="fv_Envelope" runat="server"
    instead of
    <asp:FormView ID="Envelope" runat="server"
    in Envelope.ascx source code.

    Please have a try and let me know the result.

    By the way, I notice that you did not install SP1 of Visual Studio 2008, I strongly recommend you download and install it here, SP1 has many fixes.
    Best regards


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback, please tell us.
    Welcome to the All-In-One Code Framework!
    • Marked as answer by Roahn Luo Thursday, September 09, 2010 3:40 AM
    Thursday, September 02, 2010 3:05 AM

All replies

  • Hello slyth,

    Thanks for your thread and the detailed project to reproduce the issue!

    And yes, it is reproducable here.

    For warning 1, please:
    use
    <%@ Register src="~/Envelope.ascx" tagname="Envelope" tagprefix="uc1" %>
    instead of
    <%@ Register src="Envelope.ascx" tagname="Envelope" tagprefix="uc1" %>

    For error 2, please:
    use
    <asp:FormView ID="fv_Envelope" runat="server"
    instead of
    <asp:FormView ID="Envelope" runat="server"
    in Envelope.ascx source code.

    Please have a try and let me know the result.

    By the way, I notice that you did not install SP1 of Visual Studio 2008, I strongly recommend you download and install it here, SP1 has many fixes.
    Best regards


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback, please tell us.
    Welcome to the All-In-One Code Framework!
    • Marked as answer by Roahn Luo Thursday, September 09, 2010 3:40 AM
    Thursday, September 02, 2010 3:05 AM
  • Hello,

    I'm writing to follow up the thread. Is there any updates, please?


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback, please tell us.
    Welcome to the All-In-One Code Framework!
    Thursday, September 09, 2010 3:40 AM