Trying to load a .NET dll

  • Thread starter Thread starter Mike Kamzyuk
  • Start date Start date
M

Mike Kamzyuk

I am experiencing the following problem.

I have a c++.NET dll in some directory. Let's call it ABC.dll.
Now, I try to create a c# project and add this dll to it.
So I add it as a reference.

The project builds.
When I run it, however, I get a FileNotFound exception.
File or assembly name ABC (mind you without the .dll), or one of its
dependencies, was not found.

Even more interesting, I have another app which uses this dll without
any problems, though I am not running it right now.
 
So I add it as a reference.
The project builds.
When I run it, however, I get a FileNotFound exception.
File or assembly name ABC (mind you without the .dll), or one of its
dependencies, was not found.

Have you set CopyLocal=true for the reference?



Mattias
 
Yes. That didn't work. I solved the problem though. It turns out
that the dlls on which that dll depended were not automatically copied.
So I just had to copy those too. At least they put in a pre-build
event :)
 
Back
Top