473,698 Members | 2,888 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

File or assembly name XXX, or one of its dependencies, was not found

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 asmAssemblyCont ainingForm As [Assembly] =
[Assembly].LoadFrom("neic onv.dll")
Dim TypeToLoad As Type =
asmAssemblyCont ainingForm.GetT ype("neiconv.Fr m_ND")
Dim GenericInstance As Object
GenericInstance = Activator.Creat eInstance(TypeT oLoad)

Dim NDfrm As Form = CType(GenericIn stance, Form)
NDfrm.MdiParent = Me
NDfrm.Text = NDfrm.Text + " for " +
Frm_ND.NDncffna me(Frm_ND.NDncf fname.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.Reflecti on.Assembly.nLo ad(AssemblyName fileName, String
codeBase, Boolean isStringized, Evidence assemblySecurit y, Boolean
throwOnFileNotF ound, Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflecti on.Assembly.Int ernalLoad(Assem blyName assemblyRef,
Boolean stringized, Evidence assemblySecurit y, StackCrawlMark& stackMark)
at System.Reflecti on.Assembly.Loa dFrom(String assemblyFile, Evidence
securityEvidenc e, Byte[] hashValue, AssemblyHashAlg orithm hashAlgorithm)
at System.Reflecti on.Assembly.Loa dFrom(String assemblyFile, Evidence
securityEvidenc e)
at System.Reflecti on.Assembly.Loa dFrom(String assemblyFile)
at CNRGITools.Main MDI.Menu_ND_Cli ck(Object sender, EventArgs e) in D:\My
Documents\Visua l Studio 2003\Projects\C NRGITools\MainM DI\F_main.vb:li ne 2196
The DLL itself compiles fine.

Any ideas?

TIA
Lee
Nov 21 '05 #1
1 2897
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.c om> wrote in message
news:uN******** ******@TK2MSFTN GP10.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 asmAssemblyCont ainingForm As [Assembly] =
[Assembly].LoadFrom("neic onv.dll")
Dim TypeToLoad As Type =
asmAssemblyCont ainingForm.GetT ype("neiconv.Fr m_ND")
Dim GenericInstance As Object
GenericInstance = Activator.Creat eInstance(TypeT oLoad)

Dim NDfrm As Form = CType(GenericIn stance, Form)
NDfrm.MdiParent = Me
NDfrm.Text = NDfrm.Text + " for " +
Frm_ND.NDncffna me(Frm_ND.NDncf fname.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.Reflecti on.Assembly.nLo ad(AssemblyName fileName, String
codeBase, Boolean isStringized, Evidence assemblySecurit y, Boolean
throwOnFileNotF ound, Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflecti on.Assembly.Int ernalLoad(Assem blyName assemblyRef,
Boolean stringized, Evidence assemblySecurit y, StackCrawlMark& stackMark)
at System.Reflecti on.Assembly.Loa dFrom(String assemblyFile, Evidence
securityEvidenc e, Byte[] hashValue, AssemblyHashAlg orithm hashAlgorithm)
at System.Reflecti on.Assembly.Loa dFrom(String assemblyFile, Evidence
securityEvidenc e)
at System.Reflecti on.Assembly.Loa dFrom(String assemblyFile)
at CNRGITools.Main MDI.Menu_ND_Cli ck(Object sender, EventArgs e) in D:\My
Documents\Visua l Studio 2003\Projects\C NRGITools\MainM DI\F_main.vb:li ne
2196
The DLL itself compiles fine.

Any ideas?

TIA
Lee

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1941
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"; return (SCS.SR.IDAL.IUser) Assembly.Load(path).CreateInstance(className); ( This line iam getting Error)
3
12173
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 lot of information, but if you need more (e.g. the code) please write michael@mblarsen.dk. The problem is this error messages (the code is build just fine; no errors):
2
2310
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 dependencies, was not found. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
0
1987
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 on IIS6 on Server 2003 Enterprise. Does anybody has a working solution for me? Martin
3
1968
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 application and IIS are both ok. I ran depends on the dll and all referenced dlls are either in system32 or in the bin directory of the web application. I suspect it is some kind of security issue. Any help will be greatly appreciated. Jon Lea
1
5053
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 System.Xml, or one of its dependencies, was not found. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information
0
2106
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 component, all the rest is standart). When our client need the app, we say "only install the framework 1.1" (only???, poor of us !!!).
4
1617
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 upload them to the server and after signing them in to the GAC i m getting some errors.
2
1759
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 I then get this error when I refresh the browser. I have to restart IIS to fix the problem. I've included the error info but it all looks very cryptic to me. How do I find out what's really happening and how to fix it? Thanks
3
9079
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?
0
8683
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8611
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9170
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8876
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7741
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5867
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4624
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.