473,406 Members | 2,352 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,406 software developers and data experts.

Unhandled Exception: System.IO.FileNotFoundException: File or assembly name xx or one of its dependencies, was not found

Hi guys

Do you ever get the exception in Managed C++? How can I know which file or
dll is missed?
Dec 16 '05 #1
3 9063
James,

Have you checked the FileName property of the FileNotFoundException that
is thrown?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"James" <ja********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi guys

Do you ever get the exception in Managed C++? How can I know which file or
dll is missed?

Dec 16 '05 #2
This is a demonstrate

myc++.lib is my API library, which using /delayload:avrt.dll to compile.
When I using "cl /clr /LD xxx.cpp /link /delayload:avrt.dll myc++.lib"
to compile the xxx.dll, test3.exe will work abnormal. But I remove
/delayload:avrt.dll, test3 will throw FileNotFoundException exception
cl /clr /LD xxx.Definition.cpp // the file defines the global enum and
struct value type
cl /clr /LD xxx.cpp /link myc++.lib // xxx.cpp using xxx.Definition.dll and
using functions from myc++.lib
csc test.cs /reference:xxx.Definition.dll /reference:xxx.dll
test.exe
Unhandled Exception: System.IO.FileNotFoundException: File or assembly name
xxx, or one of its dependencies, was not found.
File name: "xxx"
at MyClass.Main(String[] args)

=== Pre-bind state information ===
LOG: DisplayName = xxx, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null (Fully-specified)
LOG: Appbase = D:\tmp\C#Test\Test2\
LOG: Initial PrivatePath = NULL
Calling assembly : Test3, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null.

===

LOG: Application configuration file does not exist.
LOG: Policy not being applied to reference at this time (private, custom,
partia
l, or location-based assembly bind).
LOG: Post-policy reference: xxx, Version=0.0.0.0, Culture=neutr
al, PublicKeyToken=null
LOG: Attempting download of new URL file:///D:/tmp/C#Test/Test2/xxx.DLL.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:Ox*************@TK2MSFTNGP09.phx.gbl... James,

Have you checked the FileName property of the FileNotFoundException
that is thrown?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"James" <ja********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi guys

Do you ever get the exception in Managed C++? How can I know which file
or dll is missed?


Dec 16 '05 #3
That means that "avrt.dll" is not found when loading xxx.dll (a dependent of
your myc++.dll), make sure both are in your path or in the same directory.

Note that you better post C++ questions to the vc NG
(microsoft.public.dotnet.languages.vc)
Willy.
"James" <ja********@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
This is a demonstrate

myc++.lib is my API library, which using /delayload:avrt.dll to compile.
When I using "cl /clr /LD xxx.cpp /link /delayload:avrt.dll myc++.lib"
to compile the xxx.dll, test3.exe will work abnormal. But I remove
/delayload:avrt.dll, test3 will throw FileNotFoundException exception
cl /clr /LD xxx.Definition.cpp // the file defines the global enum
and struct value type
cl /clr /LD xxx.cpp /link myc++.lib // xxx.cpp using xxx.Definition.dll
and using functions from myc++.lib
csc test.cs /reference:xxx.Definition.dll /reference:xxx.dll
test.exe


Unhandled Exception: System.IO.FileNotFoundException: File or assembly
name xxx, or one of its dependencies, was not found.
File name: "xxx"
at MyClass.Main(String[] args)

=== Pre-bind state information ===
LOG: DisplayName = xxx, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null (Fully-specified)
LOG: Appbase = D:\tmp\C#Test\Test2\
LOG: Initial PrivatePath = NULL
Calling assembly : Test3, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null.

===

LOG: Application configuration file does not exist.
LOG: Policy not being applied to reference at this time (private, custom,
partia
l, or location-based assembly bind).
LOG: Post-policy reference: xxx, Version=0.0.0.0, Culture=neutr
al, PublicKeyToken=null
LOG: Attempting download of new URL file:///D:/tmp/C#Test/Test2/xxx.DLL.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:Ox*************@TK2MSFTNGP09.phx.gbl...
James,

Have you checked the FileName property of the FileNotFoundException
that is thrown?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"James" <ja********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi guys

Do you ever get the exception in Managed C++? How can I know which file
or dll is missed?



Dec 16 '05 #4

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

Similar topics

0
by: Oliver | last post by:
Hello, I may have posted in the wrong place, if so, feel free to move my post (just notify me where you put it via email or something) I’m having a problem with my program that I cant...
2
by: Scott Reynolds | last post by:
I am having a problem exposing a class inherited from the collection base class as a webservice. If I expose the collection on a web page all works well and I am very happy. However when I try and...
0
by: khamael | last post by:
Hi all, I've made an Outlook add-in that does some calls to a web service. When I make the first call to that web service, I'm getting the following exception: ---- ...
3
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...
0
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 ...
1
by: Parag Mahajan | last post by:
Hello, I am using VS.Net 2003 1.1 framework. I have a VB.Net client project consuming Axis 1.1 web service. Whenever I try to create an instance of the WebService, I get the following...
1
by: Ryan.Mohammed | last post by:
I have a problem that does not happen without .NET 1.1 however it does happen on machines that have .NET 1.1 SP1 installed. Createinstance attempts to create an instance of ICEBOX.dll which...
1
by: Mongo | last post by:
I am getting the following error when I try to run a new webservice I have placed on any one of 4 windows 2003 servers. (Running under ASP.NET 1.1) To minimize the problem, I created a simple...
6
by: Miro | last post by:
I can run an exe ( and its install ) i have created on my machine. The exe has a button that populates a dataset and then shoots it to a crystal report. But... Installing the setup.exe on my...
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: 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...
0
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,...
0
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...
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.