Discussion:
DLL Problem - FileNotFound exception
(too old to reply)
d***@hotmail.com
2011-08-26 09:07:17 UTC
Permalink
Hi All. VB.net 2010

I have created a small console app that references the chilkat library. This
is the first time I have ever used a library that was not supplied by the vs
environment.

On the production machine (or any PC with vs 2010 installed) it works fine.
When I copy the .exe and the chilkat library to another machine I get an
exception when it calls the chilkat library the first time. This is true for
both WinXP and Vista. I am compiling as x86 processor

I thought (obviously wrong) that the system would search the program dir
where the exe lives and then windows\system32 dir if it cannot find the dll.

I have added a reference to the dll in the project/properties
I have added an import statement to the Module

How can I tell the project to find the dll in the same folder as the exe
file. I have googled a lot on this and found nothing concrete as an answer.
Maybe I'm googling for the wrong thing, who knows.

Please a little help on this would be so nice.

Thanks in advance. Dave
Nobody
2011-08-26 17:08:54 UTC
Permalink
Post by d***@hotmail.com
Hi All. VB.net 2010
I have created a small console app that references the chilkat library.
This is the first time I have ever used a library that was not supplied by
the vs environment.
On the production machine (or any PC with vs 2010 installed) it works
fine. When I copy the .exe and the chilkat library to another machine I
get an exception when it calls the chilkat library the first time. This is
true for both WinXP and Vista. I am compiling as x86 processor
I thought (obviously wrong) that the system would search the program dir
where the exe lives and then windows\system32 dir if it cannot find the dll.
I have added a reference to the dll in the project/properties
I have added an import statement to the Module
How can I tell the project to find the dll in the same folder as the exe
file. I have googled a lot on this and found nothing concrete as an
answer. Maybe I'm googling for the wrong thing, who knows.
Please a little help on this would be so nice.
Read the help file for the library and search for "redistribute",
"redistributable", "distribution"or "package" just in case the author has
special instructions, especially where to put the files, which may not be
the same as the EXE folder. Failing that, look for "regasm" in MSKB or MSDN.
Nobody
2011-08-26 17:44:20 UTC
Permalink
See these articles if you want to put the library in the same folder as the
EXE:

Isolated Applications and Side-by-side Assemblies
http://msdn.microsoft.com/en-us/library/dd408052

Registration-Free Activation of .NET-Based Components: A Walkthrough
http://msdn.microsoft.com/en-us/library/ms973915.aspx

Loading...