Results 1 to 8 of 8

Thread: [2008] Method 'System.Collections.Generic.List`1[].Add' not found

Threaded View

  1. #1

    Thread Starter
    ^:^...ANGEL...^:^ wrack's Avatar
    Join Date
    Mar 2002
    Location
    Melbourne, AUSTRALIA
    Posts
    2,695

    Resolved [2008] Method 'System.Collections.Generic.List`1[].Add' not found

    Greeting,

    I get the error below.

    Code:
    Method 'System.Collections.Generic.List`1[[Testing.Controls.UIMenuItem, Testing.Controls, Version=1.0.3183.23614, Culture=neutral, PublicKeyToken=null]].Add' not found
    So to describe the problem, I have a solution with following structure.

    Code:
    Testing.sln
        Testing.Controls (Class Library Project)
            UIMenuController (User Control)
            UIMenuItem (User Control, Designtime non visible)
            UIMenu (User Control, Designtime non visible)
        Testing.ClientBase (Class Library Project)
            FormBase (UIMenuController control added, UIMenuItem added to the collection in UIMenuController)
            FormData inherited from FormBase (another UIMenuItem added to the collection in UIMenuController)
    Error is at
    Code:
    Method 'System.Collections.Generic.List`1[[Testing.Controls.UIMenuItem, Testing.Controls, Version=1.0.3183.23614, Culture=neutral, PublicKeyToken=null]].Add' not found.   
      
    C:\Projects\Testing\Testing.ClientBase\FormData.Designer.vb   
    Line 28   
    Col 0
    Call stack is
    Code:
    at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)   
    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)   
    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)
    Now I can add as many UIMenuItems as I want in the FormBase with no problems but the moment I try to do that in any other form inherited from the FormBase it decides to throw me an error.

    It adds it fine but then when you compile and try to see the form then you get an error. I have searched up and down the net and haven't found any solution and since the properties of the UIMenuController are a normal collection I can't see where things are going wrong.

    I am attaching the whole solution for further inspection (It's created in Visual Studio 2008 with all projects set to use Framework 2.0). Any help would be greatly appreciated.
    http://www.codelake.com/ausshare/msdn/testing.zip

    Cheers
    Last edited by wrack; Sep 18th, 2008 at 07:02 PM.

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