Can't find a class library dll in design mode
-
Hello! I have one solution file that consist of three project. One project that build a user control dll. In this user control we have a class called B One project that build a class library dll. In this class library we have a class called C In the user control project I have a project reference to the class library. I build the user control dll and this class library successfully. This user control dll is added to the Toolbox. In the constructor for this class B is a call to instansiate a class C in the class library. When I add this user control to the Toolbox I use directory obj/debug to select the user control dll. So adding the user control works fine. When I drag this user control from the Toolbox into a form that exist in the project that build the exe file object B will be instansiated and another object which is class C will also be instansiated that exist in the class library. Like this. public B() { InitializeComponent(); Last.C last = new Last.C(); last.foo(); } In design mode when we want to design a form that exist in the project that build the exe file we have one dependency the user control is dependent of the class library because an instance of class C will be instansiated as I mentioned before. Now to my problem when I try to drag the user control from the toolbox into a form that exist in the project that build the exe file which search path is used to locate the class library dll because I get this error "An exception occured while trying to create an instance of WindowsControlLibrary.B. The execption was "?"." probably because the class library can't be found. Where should I look and what should I do? I'm rather new to using user control dll and class library. One more additional information is when I drag the use control into a form a get the error message and at the same time two references are added which is the class library dll and the user control dll If I look at the reference path for the class library that was added I discover that my class library exist in this directory. If I look at the reference path for the user control library that was added I discover that my user control library exist in this directory. The two added reference path are the same. //Tony