Application cant find dll even when it's in the same directory

G

Guest

Hi All,

I'm working on an application which uses a dll for some of its classes.

I build the application and the dll and it runs fine on any machine with
Visual Studio .NET installed on it. Once you take the application and the dll
and place them on a machine without Visual Studio .NET the application throws
the following error:

Unhandled Exception: System.IO.FileNotFoundException: File or assembly name
Clie
ntAPI, or one of its dependencies, was not found.
File name: "ClientAPI"
at main()

=== Pre-bind state information ===
LOG: DisplayName = ClientAPI, Version=1.0.1992.20855, Culture=neutral,
PublicKey
Token=null
(Fully-specified)
LOG: Appbase = C:\Documents and Settings\jwieland\Desktop\Signal Testing\
LOG: Initial PrivatePath = NULL
Calling assembly : TestBed, Version=1.0.1992.20856, Culture=neutral,
PublicKeyTo
ken=null.
===

LOG: Policy not being applied to reference at this time (private, custom,
partia
l, or location-based assembly bind).
LOG: Post-policy reference: ClientAPI, Version=1.0.1992.20855,
Culture=neutral,
PublicKeyToken=null
LOG: Attempting download of new URL file:///C:/Documents and
Settings/jwieland/D
esktop/Signal Testing/ClientAPI.DLL.

The application is TestBed.exe and the dll is ClientAPI.dll and both are
placed in the same directory. Any ideas anyone?

Cheers
John
 
G

Guest

Chris:
The ClientAPI.dll does depend on other libraries which are built as part of
the same solution. Those are also present in the same directory and I've
built/rebuilt a number of times to make sure they are of the same release
config.
 
G

Guest

Jim:
I've installed the dotnetfx (.NET Framework 1.1.) but selected the "Runtime"
option I believe.

Hmm, perhaps I'll try the "Developer" or one of the other options. Cheers
 
G

Guest

Sorry, I was thinking about a different install than the .NET Framework 1.1
installer when I was referring to Runtime and developer options..
 
J

jabailo

My experience was when deploying an exe that called a dll that called a
second dll, the second .dll could not be found, even in the same directory.

I tried putting them in the GAC but the 2nd dll would still not be found.

My solution:

Put the dlls in the /winnt/system32 directory.

Then, bingo, it got found.

Think you're out of dll-hell?

Think again, dotnetters!
 
G

Guest

hi JOhnny,
Were you ever able to resolve this issue. I read soemthing about ASPNET
having permission problems on c:\winnt\temp and in spite of having the right
permission my application also fails with the same error.

Can you please let me know if you resolved it?
 
G

Guest

Hi all,

Yes, I did resolve this problem, I needed to use Dependency Walker (its all
over the net, you should be able to find it with a google) to check that all
of the dll's required by the program were installed. I found that
MSVCR71D.dll wasn't installed (and one of my dll even said it needed
MSJAVA.dll which is very strange considering the code is entirely C++...so I
just stuck it in there anyway). This did the trick.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top