none
Error adding custom control to Toolbox RRS feed

  • Question

  • I have created a class with a custom user contol which uses a 3rd party grid control.  In that solution, I am able to create a project and use the control with no problems.  The custom control automatically comes up in the toolbox to use.

    When I try to add this control to the toolbar withing a new project (outside of the class solution) I get the error: There was an error loading types from assembly 'C:\Program Files\...\IR.Common.dll' 'Could not load file or assembly 'C1.Win.Flexgrid.2 ..' or one of its dependencies.  The system can not find the file specified.

    In the project I am trying to use this component, it does have a reference to 'C1.Win.Flexgrid.2' and to the IR.Common.dll.  I have check all the version numbers.  How do I get this control to show up on the toolbar so that i can use it on my form??
    Wednesday, September 3, 2008 3:28 PM

Answers

  • BumpaRoy said:

    I have created a class with a custom user contol which uses a 3rd party grid control.  In that solution, I am able to create a project and use the control with no problems.  The custom control automatically comes up in the toolbox to use.

    When I try to add this control to the toolbar withing a new project (outside of the class solution) I get the error: There was an error loading types from assembly 'C:\Program Files\...\IR.Common.dll' 'Could not load file or assembly 'C1.Win.Flexgrid.2 ..' or one of its dependencies. 
    The system can not find the file specified.

    In the project I am trying to use this component, it does have a reference to 'C1.Win.Flexgrid.2' and to the IR.Common.dll.  I have check all the version numbers.  How do I get this control to show up on the toolbar so that i can use it on my form??

    Hi BumpaRoy,

    Here are some suggestions:
    1. Manually copy IR.Common.dll and C1.Win.Flexgrid.2.dll into that folder where your custom control is, in order to keep them at the same place. Or in your User Control project, set "Copy Local" Property value as True for these dlls.

    2. Install these DLLs into the GAC.
       
    http://support.microsoft.com/kb/315682


    Some similar issues for you to check:
    File or assembly name or one of its dependencies not found?
    http://weblogs.asp.net/jclarknet/archive/2005/07/21/420126.aspx
    http://blogs.msdn.com/sayanghosh/archive/2007/04/21/solution-to-could-not-load-file-or-assembly-or-one-of-its-dependencies-access-is-denied.aspx


    Best regards,
    Martin Xie

    Tuesday, September 9, 2008 10:50 AM