What is the simplest way to link DLLs?

  • Thread starter Thread starter ZaX
  • Start date Start date
Z

ZaX

Good day folks,

I'm wondering what is the easiest way to link DLLs to a project with VB.NET.

I've been building an app here (framework 1.1). In my project, I added a few
references to files I've copied in my bin folder. The Copy Local property
for the DLLs is set to true.

Here, everything works fine.

But when I try to copy the bin folder to the production machine, I keep
receiving a message saying the DLL or one of its dependancies cannot be
found. However, the said DLL is in the same folder, along with each and
every of its dependencies...

I tried to add the DLLs to the GAC, but it refuse to let me do so saying
they are not strongly named.

Someone has an idea?

Thanks

ZaX
 
ZaX said:
Good day folks,

I'm wondering what is the easiest way to link DLLs to a project with VB.NET.

I've been building an app here (framework 1.1). In my project, I added a few
references to files I've copied in my bin folder. The Copy Local property
for the DLLs is set to true.

Here, everything works fine.

But when I try to copy the bin folder to the production machine, I keep
receiving a message saying the DLL or one of its dependancies cannot be
found. However, the said DLL is in the same folder, along with each and
every of its dependencies...

I tried to add the DLLs to the GAC, but it refuse to let me do so saying
they are not strongly named.

Someone has an idea?

Thanks

ZaX
Not to sound like an a$$, but try a google on "Strong Name Signing of
Assemblies" to start with. You will be overwhelmed by the amount of
information. It's worth it, trust me :)

Jody
 
0) This is a case where using a deployment project would be helpful.

1) If the dll files are .net, then you can create strong names for them and
install them in the GAC -- I would NOT advise doing this, however, since the
dlls sound like single-use components (i.e. other programs will not need
them) . should you decide to give them strong names you can use the Strong
Name Tool (sn.exe) to create a Public/Private Key Pair; next, you either
create/modify the <Assembly: AssemblyKeyFile("..\MyKey.snk")> key in the
..config-file or you use the Assembly Linker Tool (al.exe)

as for the problem of determining what is failing, you can use fuslogvw.exe
to troubleshoot binding problems.
 
Thanks for the help and the tips.

I've finally solved my problem the hard way.

I've loaded the dlls dynamically using reflection and when I called the
first method of the DLL, there was a message saying it was missing another
DLL, some C librairy file...

I copied this from one machine to another in the system folder and
everything went fine after.
 
Back
Top