473,385 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

FileNotFoundException'

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
Nov 17 '05 #1
8 8901
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@alpha-solutions.dk> wrote in message
news:u7****************@TK2MSFTNGP14.phx.gbl...
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

Nov 17 '05 #2
Do I have to uninstall first?

"Angel J. Hernández M." <an**********@hotmail.com> skrev i en meddelelse
news:e2**************@TK2MSFTNGP15.phx.gbl...
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@alpha-solutions.dk> wrote in message
news:u7****************@TK2MSFTNGP14.phx.gbl...
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


Nov 17 '05 #3
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@alpha-solutions.dk> wrote in message
news:eE**************@TK2MSFTNGP12.phx.gbl...
Do I have to uninstall first?

"Angel J. Hernández M." <an**********@hotmail.com> skrev i en meddelelse
news:e2**************@TK2MSFTNGP15.phx.gbl...
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@alpha-solutions.dk> wrote in message
news:u7****************@TK2MSFTNGP14.phx.gbl...
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



Nov 17 '05 #4
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" <ca*****@tamu.edu> skrev i en meddelelse
news:11*************@corp.supernews.com...
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@alpha-solutions.dk> wrote in message
news:eE**************@TK2MSFTNGP12.phx.gbl...
Do I have to uninstall first?

"Angel J. Hernández M." <an**********@hotmail.com> skrev i en meddelelse
news:e2**************@TK2MSFTNGP15.phx.gbl...
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@alpha-solutions.dk> wrote in message
news:u7****************@TK2MSFTNGP14.phx.gbl...
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



Nov 17 '05 #5
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@alpha-solutions.dk> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
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" <ca*****@tamu.edu> skrev i en meddelelse
news:11*************@corp.supernews.com...
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@alpha-solutions.dk> wrote in message
news:eE**************@TK2MSFTNGP12.phx.gbl...
Do I have to uninstall first?

"Angel J. Hernández M." <an**********@hotmail.com> skrev i en meddelelse
news:e2**************@TK2MSFTNGP15.phx.gbl...
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@alpha-solutions.dk> wrote in message
news:u7****************@TK2MSFTNGP14.phx.gbl...
> 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
>



Nov 17 '05 #6
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" <ca*****@tamu.edu> wrote in message
news:11*************@corp.supernews.com...
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@alpha-solutions.dk> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
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" <ca*****@tamu.edu> skrev i en meddelelse
news:11*************@corp.supernews.com...
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@alpha-solutions.dk> wrote in message
news:eE**************@TK2MSFTNGP12.phx.gbl...
Do I have to uninstall first?

"Angel J. Hernández M." <an**********@hotmail.com> skrev i en
meddelelse news:e2**************@TK2MSFTNGP15.phx.gbl...
> 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@alpha-solutions.dk> wrote in message
> news:u7****************@TK2MSFTNGP14.phx.gbl...
>> 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
>>
>
>



Nov 17 '05 #7
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" <ca*****@tamu.edu> skrev i en meddelelse
news:11*************@corp.supernews.com...
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" <ca*****@tamu.edu> wrote in message
news:11*************@corp.supernews.com...
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@alpha-solutions.dk> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
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" <ca*****@tamu.edu> skrev i en meddelelse
news:11*************@corp.supernews.com...
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@alpha-solutions.dk> wrote in message
news:eE**************@TK2MSFTNGP12.phx.gbl...
> Do I have to uninstall first?
>
> "Angel J. Hernández M." <an**********@hotmail.com> skrev i en
> meddelelse news:e2**************@TK2MSFTNGP15.phx.gbl...
>> 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@alpha-solutions.dk> wrote in message
>> news:u7****************@TK2MSFTNGP14.phx.gbl...
>>> 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
>>>
>>
>>
>
>



Nov 17 '05 #8
> 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?


No, I don't think so - it isn't a compilation issue (thus why VS did not
catch it). Reflection is all at runtime, so if the library changes to
instantiate a class from some other DLL, that other DLL will have just need
to be in a place it can be located (aka: same directory, windows/system32,
etc).

If you have access to the library code, you might test that by writing up a
quick new library with a class that implements the interface and try to
instatiate it without recompiling your app. Better to be safe than sorry
later :)

--
Adam Clauss
Nov 17 '05 #9

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

Similar topics

1
by: ulf | last post by:
Hello, After I got a FileNotFoundException in my real life CSharp code, I nailed it down to the following line: System.EnterpriseServices.ResourcePool rp = new...
2
by: Michael Sanford | last post by:
I'm getting a Sysmte.IO.FileNotFoundException when executing the code below. It is straight from the example. This works on one machine, but not the other. Other benign calls invoke the same...
0
by: Daylor | last post by:
any suggestions, why FileNotFoundException is throw , when im try to send object from appdomain to other ? (the object inherits MarshalByRefObject) i dont have a clue what the VS.2003 want...
3
by: Nick | last post by:
Hello, Let me explain my situation. There is an application in C++ (that I didn't write) that needs to call a C# DLL. One option, I believe, would be to compile the app with the clr switch....
5
by: MattC | last post by:
Hi, I am getting the following error: System.IO.FileNotFoundException: C:\Dreamtxt\WebSites\mysite\www\feedback.aspx at System.Web.UI.TemplateParser.GetParserCacheItem() at...
3
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?
5
by: SGRing | last post by:
I have a c# application that I'm migrating from 2003 to 2005, and I moved it to another machine. It built ok. But, when trying to run I get System.IO.FileNotFoundException was unhandled...
0
by: Peter Vestergaard | last post by:
Hi, I am running VS .Net 2005. I have an application in which one of the classes are having a member that is an instance of a class defined in a managed C++ dll. As soon as I try to create an...
2
by: jjlagtap | last post by:
Hey everyone When I try to open a file i get the Exception listed below. The weird thing is it works when I run the web app locally and when i use a remote server and open a file on my computer....
2
by: bbindae | last post by:
I am trying to check whether XmlTextReader reads the xml file successfully or not. MSDN says that XmlTextReader raise the FileNotFoundException when it cannot find the file to read. Here is...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
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,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
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...
0
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
0
BarryA
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.