PC Review


Reply
Thread Tools Rate Thread

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

 
 
tony
Guest
Posts: n/a
 
      3rd Apr 2006
Hello!

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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What kind of search path is used in design time and run time when using class library. tony Microsoft C# .NET 0 3rd Apr 2006 09:25 AM
create design time library using vs.net gerry Microsoft Dot NET Compact Framework 4 2nd Nov 2004 04:47 AM
Re: Get assembly/type library at design time WALDO Microsoft Dot NET 2 5th Sep 2003 04:06 PM
Re: Get assembly/type library at design time WALDO Microsoft VB .NET 2 5th Sep 2003 04:06 PM
Re: Get assembly/type library at design time WALDO Microsoft Dot NET Framework 2 5th Sep 2003 04:06 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:33 PM.