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(AssemblyNa me 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 1 2863
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" <lg***@nospam.com> wrote in message
news:uN**************@TK2MSFTNGP10.phx.gbl... 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(AssemblyNa me 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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: karunakar |
last post by:
Hi All
I am not able to read the class name I want read the particular class name
string path =
System.Configuration.ConfigurationSettings.AppSettings;
string className = path + ".User";...
|
by: Michael Bøcker-Larsen |
last post by:
Hi
I'v been stuck on this problem for ages now. I have found that I'm not
the only one with this problem, by looking through the different
newsgroups.
Hope you can help me! I know there is a...
|
by: aallee83 |
last post by:
i'm new in asp.net after develop my solution i copied it on the server
where I want it to run but something cares... WHAT?!?!
thank you in advance
File or assembly name System, or one of its...
|
by: Martinh |
last post by:
Hi
After invoking RetrieveData in a WebService I recieve the following
response in a new window...
I am running Microsoft .NET Framework Version:1.1.4322.573; ASP.NET
Version:1.1.4322.573 ...
|
by: jlea |
last post by:
I'm receiving the error message shown below when I try to load an aspx file
(C# web application) on our server. The web application works fine if I
remove the reference to the dll so I know the...
|
by: Olav Tollefsen |
last post by:
I get the included error message when trying to run my ASP.NET application
under Windows Server 2003 (with all updates installed).
How can I troubleshoot this?
Olav
File or assembly name...
|
by: Federico Hernández Arce |
last post by:
Hi group, first sorry for my poor english
We have a vb.net app, run whit any problem in our pcs (whit vs.net 2003
installed).
The app have a ocx that draw a binary tree (the only external...
|
by: Tiraman |
last post by:
Hi,
i have some problem to run my dll's (assemblies) on the production server.
I have 3 dll's which use each other.
Every thing is ok on my local machine where i developed them
but when i...
|
by: Andrew Jocelyn |
last post by:
Hi
I get this error when I change something in the web.config file. When I
build the VS projects and load the first web page the application runs fine.
If I then make a save the web.config file...
|
by: James |
last post by:
Hi guys
Do you ever get the exception in Managed C++? How can I know which file or
dll is missed?
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| | |