471,075 Members | 794 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,075 software developers and data experts.

What kind of search path is used in design time and run time when using class library.

Hello!

I'm not sure if this is the right group to send my question in.

I have one solution file that consist of three project.
One project that build the exe file called A
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
Apr 3 '06 #1
0 1013

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

54 posts views Thread by Brandon J. Van Every | last post: by
137 posts views Thread by Philippe C. Martin | last post: by
7 posts views Thread by Bradley1234 | last post: by
121 posts views Thread by typingcat | last post: by
21 posts views Thread by Helge Jensen | last post: by
13 posts views Thread by Jason Huang | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.