none
Designer shows errors after adding 3rd party .Net control RRS feed

  • Question

  • I am using the ZedGraph component on a Winform in a managed DLL. Though the project is building and running fine, when I try to view the Winform in designer I am getting the following error:

    Could not find type 'ZedGraph.ZedGraphControl'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built.

    As a result I'm not able to view the screen design and am forced to make all changes to the screen programatically, instead of reaping benefits of the rich .Net designer

    Please note that I'm using VS 2005. The assembly that I use for ZedGraph is ZedGraph.DLL which is duly referenced and its namespace added wherever necessary (well...the solution builds fine).

    I'd appreciate your valuable suggestions in this regard.
    Wednesday, July 23, 2008 4:40 PM

Answers

  • Yup, that's indicative of that problem.  It works when the working directory for the IDE happens to be pointing at the right folder.  But that changes unpredictably while you are using the IDE.
    Hans Passant.
    • Marked as answer by Zhi-Xin Ye Tuesday, July 29, 2008 11:18 AM
    Wednesday, July 23, 2008 8:15 PM
    Moderator

All replies

  • I'd guess that the assembly has another dependency.  Could be an unmanaged DLL, could be an assembly.  If that's the case, neither Windows or the CLR assembly loader is likely to find that DLL at design time if it is not stored in a well-known location (c:\windows\system32, GAC).  You'll need support from the makers of ZedGraph to get this resolved, it is not a CLR issue.

    Hans Passant.
    Wednesday, July 23, 2008 6:23 PM
    Moderator
  • It might be what you suggest, but there is a strange behavior that makes me to think there might be something else to it.
    If I restart VS 2005, then at times problem is automatically resolved. Sometimes when I open the solution, no matter what I try, the designer would only show the errors for ZedGraph controls while sometimes the WinForm is perfectly visible, including the ZedGraph controls that are added to the WinForm.
    Any thoughts?
    Wednesday, July 23, 2008 7:24 PM
  • Yup, that's indicative of that problem.  It works when the working directory for the IDE happens to be pointing at the right folder.  But that changes unpredictably while you are using the IDE.
    Hans Passant.
    • Marked as answer by Zhi-Xin Ye Tuesday, July 29, 2008 11:18 AM
    Wednesday, July 23, 2008 8:15 PM
    Moderator