Re: FileNotFoundException'
- From: "Peter Kirk" <pk@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 20 Jun 2005 21:21:34 +0200
Thanks - as it turns out I am directly using the instantiated class - I
wasn't thinking clearly.
I call a method in a library which returns me an object which implements a
specific interface (IDirectoryWatch). The library finds out which concrete
class to instantiate from configuration and uses reflection to perform the
instantiation.
My program really only knows the interface, but I need to reference the
concrete class which is instantiated by the library ... odd, actually isn't
it? What happens if the library is altered (or just confugured differently)
and returns another type of object, but which still implements
IDirectoryWatch? Do I need to recompile my program?
Hmm.
Peter
"Adam Clauss" <cabadam@xxxxxxxx> skrev i en meddelelse
news:11bdm17holkk085@xxxxxxxxxxxxxxxxxxxxx
> Never mind... misread the part about reflection. That would be why it
> didn't catch it.
>
> Glad you got it working!
>
> ---
> Adam Clauss
>
> "Adam Clauss" <cabadam@xxxxxxxx> wrote in message
> news:11bdlrnauckhof0@xxxxxxxxxxxxxxxxxxxxx
>> Odd, typically Visual Studio catches missing references on compilation
>> and will throw an error there. Wonder why this one got through...
>>
>> Adam Clauss
>>
>> "Peter Kirk" <pk@xxxxxxxxxxxxxxxxxx> wrote in message
>> news:%236XOMVadFHA.3712@xxxxxxxxxxxxxxxxxxxxxxx
>>> Hi, thanks. I didn't really think that was the problem either.
>>>
>>> It turns out one of the libraries I use instantiates a class using
>>> reflection (from configuration).
>>>
>>> I need to make sure that that class is "referenced" by my main program
>>> class (even though I'm not directly using it).
>>>
>>> Peter
>>>
>>> "Adam Clauss" <cabadam@xxxxxxxx> skrev i en meddelelse
>>> news:11bdknrl1dk1l5d@xxxxxxxxxxxxxxxxxxxxx
>>>>I don't think that's the problem. I've seen this problem occur many
>>>>times just because some DLL is in the wrong place.
>>>>
>>>> Try searching for a program called "Dependency Walker" (google should
>>>> be able to find it).
>>>> Run that and load the ASolutions.Directory.Service module. It should
>>>> tell you if any of it's dependencies are missing.
>>>>
>>>> ---
>>>> Adam Clauss
>>>>
>>>>
>>>> "Peter Kirk" <pk@xxxxxxxxxxxxxxxxxx> wrote in message
>>>> news:eEBGuNadFHA.3932@xxxxxxxxxxxxxxxxxxxxxxx
>>>>> Do I have to uninstall first?
>>>>>
>>>>> "Angel J. Hernández M." <angeljesus14@xxxxxxxxxxx> skrev i en
>>>>> meddelelse news:e28EnCadFHA.1504@xxxxxxxxxxxxxxxxxxxxxxx
>>>>>> Hi there... You can fix this by reinstalling the .NET Framework.
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Angel J. Hernández M.
>>>>>> MCP - MCAD - MCSD - MCDBA
>>>>>> http://groups.msn.com/desarrolladoresmiranda
>>>>>> http://www.consein.com
>>>>>>
>>>>>>
>>>>>> "Peter Kirk" <pk@xxxxxxxxxxxxxxxxxx> wrote in message
>>>>>> news:u7D6F%23ZdFHA.2124@xxxxxxxxxxxxxxxxxxxxxxx
>>>>>>> Hi, when I run my c# program I get this error:
>>>>>>>
>>>>>>> An unhandled exception of type 'System.IO.FileNotFoundException'
>>>>>>> occurred in mscorlib.dll.
>>>>>>> Additional information: File or assembly
>>>>>>> ASolutions.Directory.Service or one of its dependencies was not
>>>>>>> found.
>>>>>>>
>>>>>>> Great... but how do I find out exactly what could not be found? (I
>>>>>>> am using several libraries, which also use other libraries, and I
>>>>>>> would really like to know what it is I need to find).
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Peter
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
.
- Follow-Ups:
- Re: FileNotFoundException'
- From: Adam Clauss
- Re: FileNotFoundException'
- References:
- FileNotFoundException'
- From: Peter Kirk
- Re: FileNotFoundException'
- From: Angel J. Hernández M.
- Re: FileNotFoundException'
- From: Peter Kirk
- Re: FileNotFoundException'
- From: Adam Clauss
- Re: FileNotFoundException'
- From: Peter Kirk
- Re: FileNotFoundException'
- From: Adam Clauss
- Re: FileNotFoundException'
- From: Adam Clauss
- FileNotFoundException'
- Prev by Date: Re: C# COM object not being released
- Next by Date: aaaaaa
- Previous by thread: Re: FileNotFoundException'
- Next by thread: Re: FileNotFoundException'
- Index(es):
Relevant Pages
|