Re: How to use interfaces properly...
- From: "Francois Bonin [C# MVP]" <thecois@xxxxxxxxx>
- Date: Thu, 23 Jun 2005 13:50:34 -0000
You do not need to have your own copy of the assembly. But wherever it is,
it should be reachable by te code that needs it. You might want to load it
at runtime or install it into the GAC.
"Bagger" <Bagger@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:9CE9B509-325B-492D-ADB4-35E1ABED243D@xxxxxxxxxxxxxxxx
> Ok, I have been testing some things and now I have questions about it. I
> created a dll assembly that contains just one interface (called
> ITestInterface), which in turn just has one string property called
> TestName.
> I built that project and then closed it. Then, I created a windows forms
> project and added a reference to that assembly (it's named
> MyInterfaceTest).
> Now, before I did anything else, I ran the project and a blank form came
> up.
> That was as expected. Then I added the "Implements
> MyInterfaceTest.ITestInterface" line and it added the property code for
> me.
> I built the project again and it ran fine. Then I changed the "Copy
> Local"
> property on the reference to "false". I ran the project again and it gave
> me
> an error:
>
> -----------------------
> An unhandled exception of type 'System.IO.FileNotFoundException' occurred
> in
> Unknown Module.
>
> Additional information: File or assembly name MyInterfaceTest, or one of
> its
> dependencies, was not found.
> -----------------------
>
>
> Ok, so now I'm kind of confused. Does each application that implements an
> interface have to have its own copy of the dll that contains the
> interface?
> I'm asking this mainly because I'm working on building an app that uses a
> plugin architecture, and I am having trouble figuring out how to set up
> references that will work during development, but will also let the plugin
> developer drop his executable and associated files into the main
> application's plugins folder without breaking it. Can anyone explain how
> this should be done? Thanks!
.
- Follow-Ups:
- Re: How to use interfaces properly...
- From: Bagger
- Re: How to use interfaces properly...
- References:
- How to use interfaces properly...
- From: Bagger
- How to use interfaces properly...
- Prev by Date: Application Quitting with no Error
- Next by Date: WebExceptionStatus.ReceiveFailure
- Previous by thread: How to use interfaces properly...
- Next by thread: Re: How to use interfaces properly...
- Index(es):
Relevant Pages
|