Re: File or assembly name XXX, or one of its dependencies, was not found
- From: "lgbjr" <lgbjr@xxxxxxxxxx>
- Date: Sun, 23 Oct 2005 10:14:55 +0800
Hi All,
Another piece of information (maybe useless):
I'm catching the exception mentioned previously. After the exception occurs,
other forms that I try to load (from other DLLs) throw the same exception.
Once I restart the app, the other forms load fine.
Regards,
Lee
"lgbjr" <lgbjr@xxxxxxxxxx> wrote in message
news:uNozWK31FHA.1332@xxxxxxxxxxxxxxxxxxxxxxx
> Hi All,
>
> I am moving some of my MDI Child forms to DLLs. The first 3 forms worked
> fine. But the 4th one is causing me some grief! I use the following code
> to load a form from a DLL:
>
> Dim asmAssemblyContainingForm As [Assembly] =
> [Assembly].LoadFrom("neiconv.dll")
> Dim TypeToLoad As Type =
> asmAssemblyContainingForm.GetType("neiconv.Frm_ND")
> Dim GenericInstance As Object
> GenericInstance = Activator.CreateInstance(TypeToLoad)
>
> Dim NDfrm As Form = CType(GenericInstance, Form)
> NDfrm.MdiParent = Me
> NDfrm.Text = NDfrm.Text + " for " +
> Frm_ND.NDncffname(Frm_ND.NDncffname.Length - 1)
> NDfrm.Show()
>
> The form (DLL) that is causing problems does not use any different form
> components than the first three, but I get the following exception at the
> first line of code above:
>
> File or assembly name neiconv.dll, or one of its dependencies, was not
> found.
>
> at System.Reflection.Assembly.nLoad(AssemblyName fileName, String
> codeBase, Boolean isStringized, Evidence assemblySecurity, Boolean
> throwOnFileNotFound, Assembly locationHint, StackCrawlMark& stackMark)
> at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,
> Boolean stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)
> at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence
> securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
> at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence
> securityEvidence)
> at System.Reflection.Assembly.LoadFrom(String assemblyFile)
> at CNRGITools.MainMDI.Menu_ND_Click(Object sender, EventArgs e) in D:\My
> Documents\Visual Studio 2003\Projects\CNRGITools\MainMDI\F_main.vb:line
> 2196
>
>
> The DLL itself compiles fine.
>
> Any ideas?
>
> TIA
> Lee
>
.
- References:
- Prev by Date: File or assembly name XXX, or one of its dependencies, was not found
- Next by Date: Re: Replacement for MSChart
- Previous by thread: File or assembly name XXX, or one of its dependencies, was not found
- Next by thread: Re: Replacement for MSChart
- Index(es):
Relevant Pages
|