473,396 Members | 1,608 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,396 software developers and data experts.

Application.Run generating FileNotFound exception

Hi,
I have an applicationthat calls Application.Run from main, and this
generates a FileNotFoundException. The solution has the main program and a
number of DLLs, and it is saying that it cannot find one of the DLLs or its
dependencies. Yet the DLL is present in the application folder, and it only
has system tool dependencies, which are also used by other DLLs that load
successfully before the one causing the problem. The DLL giving the problem
is written in C++, whereas the rest of the program is in C#, but I don't see
that causing any problems.
Any suggestions? Does .Net look elsewhere than at the files in the folder to
see if a file is present or not?
Regards,
Tim
Mar 21 '06 #1
6 1941
Is it a managed C++ assembly? It sure doesn't sound like it from your
description.

Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"TimThornton" wrote:
Hi,
I have an applicationthat calls Application.Run from main, and this
generates a FileNotFoundException. The solution has the main program and a
number of DLLs, and it is saying that it cannot find one of the DLLs or its
dependencies. Yet the DLL is present in the application folder, and it only
has system tool dependencies, which are also used by other DLLs that load
successfully before the one causing the problem. The DLL giving the problem
is written in C++, whereas the rest of the program is in C#, but I don't see
that causing any problems.
Any suggestions? Does .Net look elsewhere than at the files in the folder to
see if a file is present or not?
Regards,
Tim

Mar 21 '06 #2

"TimThornton" <Ti*********@discussions.microsoft.com> wrote in message
news:79**********************************@microsof t.com...
| Hi,
| I have an applicationthat calls Application.Run from main, and this
| generates a FileNotFoundException. The solution has the main program and a
| number of DLLs, and it is saying that it cannot find one of the DLLs or
its
| dependencies. Yet the DLL is present in the application folder, and it
only
| has system tool dependencies, which are also used by other DLLs that load
| successfully before the one causing the problem. The DLL giving the
problem
| is written in C++, whereas the rest of the program is in C#, but I don't
see
| that causing any problems.
| Any suggestions? Does .Net look elsewhere than at the files in the folder
to
| see if a file is present or not?
| Regards,
| Tim

Is your DLL a native code library built with VC8? in that case you have to
embed the manifest or you have to statically link the C runtime library.

Willy.
Mar 21 '06 #3
Peter,
It is managed code, though part of it is acting as a wrapper to call other
unmanagaed DLLs. All of these unmanaged DLLs are in place.
Tim

"Peter Bromberg [C# MVP]" wrote:
Is it a managed C++ assembly? It sure doesn't sound like it from your
description.

Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"TimThornton" wrote:
Hi,
I have an applicationthat calls Application.Run from main, and this
generates a FileNotFoundException. The solution has the main program and a
number of DLLs, and it is saying that it cannot find one of the DLLs or its
dependencies. Yet the DLL is present in the application folder, and it only
has system tool dependencies, which are also used by other DLLs that load
successfully before the one causing the problem. The DLL giving the problem
is written in C++, whereas the rest of the program is in C#, but I don't see
that causing any problems.
Any suggestions? Does .Net look elsewhere than at the files in the folder to
see if a file is present or not?
Regards,
Tim

Mar 22 '06 #4
Willy,
It is managed code developed in Visual Studio 2003. This acts as a wrapper
for some DLLs that are unmanaged code, but these are all present, and have
been used like this before with no problems.
Tim

"Willy Denoyette [MVP]" wrote:

"TimThornton" <Ti*********@discussions.microsoft.com> wrote in message
news:79**********************************@microsof t.com...
| Hi,
| I have an applicationthat calls Application.Run from main, and this
| generates a FileNotFoundException. The solution has the main program and a
| number of DLLs, and it is saying that it cannot find one of the DLLs or
its
| dependencies. Yet the DLL is present in the application folder, and it
only
| has system tool dependencies, which are also used by other DLLs that load
| successfully before the one causing the problem. The DLL giving the
problem
| is written in C++, whereas the rest of the program is in C#, but I don't
see
| that causing any problems.
| Any suggestions? Does .Net look elsewhere than at the files in the folder
to
| see if a file is present or not?
| Regards,
| Tim

Is your DLL a native code library built with VC8? in that case you have to
embed the manifest or you have to statically link the C runtime library.

Willy.

Mar 22 '06 #5
There is at least a DLL missing or not found in the search path, this can be
a dependent of the wrapper dll or the native wrapped dll. Please note that
DLL's compiled with VC++ 7.1 need the VC7.1 C runtime DLL's in the path,
while the CLR (v2) uses the VC8.0 C runtime. I would suggest you to check
your dependents using dumpbin.exe or depends.exe.

Willy.

"TimThornton" <Ti*********@discussions.microsoft.com> wrote in message
news:18**********************************@microsof t.com...
| Willy,
| It is managed code developed in Visual Studio 2003. This acts as a wrapper
| for some DLLs that are unmanaged code, but these are all present, and have
| been used like this before with no problems.
| Tim
|
| "Willy Denoyette [MVP]" wrote:
|
| >
| > "TimThornton" <Ti*********@discussions.microsoft.com> wrote in message
| > news:79**********************************@microsof t.com...
| > | Hi,
| > | I have an applicationthat calls Application.Run from main, and this
| > | generates a FileNotFoundException. The solution has the main program
and a
| > | number of DLLs, and it is saying that it cannot find one of the DLLs
or
| > its
| > | dependencies. Yet the DLL is present in the application folder, and it
| > only
| > | has system tool dependencies, which are also used by other DLLs that
load
| > | successfully before the one causing the problem. The DLL giving the
| > problem
| > | is written in C++, whereas the rest of the program is in C#, but I
don't
| > see
| > | that causing any problems.
| > | Any suggestions? Does .Net look elsewhere than at the files in the
folder
| > to
| > | see if a file is present or not?
| > | Regards,
| > | Tim
| >
| > Is your DLL a native code library built with VC8? in that case you have
to
| > embed the manifest or you have to statically link the C runtime library.
| >
| > Willy.
| >
| >
| >
Mar 22 '06 #6
Willy,
Hadn't used depends before - its a useful tool , thanks for that.
Tracked it down, opengl32 and related files had disappeared from the system
somehow.
Many thanks for your help
Tim

"Willy Denoyette [MVP]" wrote:
There is at least a DLL missing or not found in the search path, this can be
a dependent of the wrapper dll or the native wrapped dll. Please note that
DLL's compiled with VC++ 7.1 need the VC7.1 C runtime DLL's in the path,
while the CLR (v2) uses the VC8.0 C runtime. I would suggest you to check
your dependents using dumpbin.exe or depends.exe.

Willy.

"TimThornton" <Ti*********@discussions.microsoft.com> wrote in message
news:18**********************************@microsof t.com...
| Willy,
| It is managed code developed in Visual Studio 2003. This acts as a wrapper
| for some DLLs that are unmanaged code, but these are all present, and have
| been used like this before with no problems.
| Tim
|
| "Willy Denoyette [MVP]" wrote:
|
| >
| > "TimThornton" <Ti*********@discussions.microsoft.com> wrote in message
| > news:79**********************************@microsof t.com...
| > | Hi,
| > | I have an applicationthat calls Application.Run from main, and this
| > | generates a FileNotFoundException. The solution has the main program
and a
| > | number of DLLs, and it is saying that it cannot find one of the DLLs
or
| > its
| > | dependencies. Yet the DLL is present in the application folder, and it
| > only
| > | has system tool dependencies, which are also used by other DLLs that
load
| > | successfully before the one causing the problem. The DLL giving the
| > problem
| > | is written in C++, whereas the rest of the program is in C#, but I
don't
| > see
| > | that causing any problems.
| > | Any suggestions? Does .Net look elsewhere than at the files in the
folder
| > to
| > | see if a file is present or not?
| > | Regards,
| > | Tim
| >
| > Is your DLL a native code library built with VC8? in that case you have
to
| > embed the manifest or you have to statically link the C runtime library.
| >
| > Willy.
| >
| >
| >

Mar 22 '06 #7

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

Similar topics

2
by: Alexey Kouzmitch | last post by:
Hi, I wrote a console application which is called from a SQL Server job. The application utilizes a COM object, to pump data from a legacy (not very old however) application to SQL server. The...
0
by: Jan Timmer | last post by:
Hello all, A customer of ours has a .net window forms application running. This application is running locally on 2 pc's. It makes use of private assemblies, to find the associated .DLL's. This...
1
by: Tom | last post by:
I load an assembly via Assembly assembly=Assembly.LoadFile(assemblyName); .... foreach(Type t in types) { attribs=t.GetCustomAttributes(typeof(MayaPanelAttribute),true); }
0
by: Cenray | last post by:
How to generate a web request from a Winform Application using a WebService? In a C# Windows Application, when I try to genrate a web request using the following code, it is woking fine ...
12
by: SJD | last post by:
I've just read Christoph Schittko's article on XmlSerializer: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnxmlnet/html/trblshtxsd.asp . . . and very informative it is too....
0
by: Simon Stewart \(C# MVP\) | last post by:
Hi Our scenario is: Various business objects on a server using interfaced-based remoting being called by a thick Windows client - all written in .NET 1.1. Objects are running under a domain...
3
by: MovnOn | last post by:
I've created an installation package for my program. Before installation, I use the User Interface to get values that are added to the registry. One of the values that the user must add is a path...
13
by: Lee Newson | last post by:
Hi, I have just written my first application using VB.NET. The app works fine when i am running it within .NET for debugging purposes, however when i try to run the app from the .exe file that...
1
by: ropo | last post by:
I have a class library used by a windows service executable, both binaries and dependancies are in one bin directory located on c:. 1) I can run a test app on my class library without failure 2)...
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: 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...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
0
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,...

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.