Help! Can not find assembly file at runtime.

  • Thread starter Thread starter Larry
  • Start date Start date
L

Larry

Hi my friends,

I created a dotnet class library and saved it at :

F:\Test\c++\ex32a\debug\ex32a.dll.

I created a client program to use this class library. My client file is
loacated at :
F:\Test\c++\ex32b\debug\ex32b.exe.

I tryed
#Using <F:\Test\c++\ex32a\debug\ex32a.dll>
#Using <..\ex32a\debug\ex32a.dll>
#Using "F:\Test\c++\ex32a\debug\ex32a.dll"

I can compile it and link correctly. But when I run it. There is an error
message : Can not find assembley file ex32a.dll or its dependency.

I set up "Resolve #using references" , still don't work.

I copied ex32a.dll to F:\Test\c++\ex32b\debug\. It works.
What's wrong with it?

That's ahead.

Regards,

Larry
 
Put the file in the directory together with its caller, or give it a strong
name and put it in the Global Assembly Cache (GAC). The path you pass to the
compiler is only used at compile time, it is not used for probing for the
assembly at runtime by Fusion (the OS loading path for assemblies).

Ronald Laeremans
Visual C++ team
 
Back
Top