views:

120

answers:

1

I'm trying to load an assembly and instantiate a type contained on it using reflection.

The assembly is included in the references and is copied to the Bin folder after publishing, but when debugging, the assembly is not found.

I noticed that each assembly is deployed to a different temp folder for debug, something like:

C:\Users\Rafael\AppData\Local\Temp\Temporary ASP.NET Files\
root\a8b5e5d3\720e0f4c\assembly\dl3\7c6d5cae\d096ebc2_d1c5c901

This way, I cannot use the path of the running, the calling, or an assembly that contains a known type to build the path of the desired one.

Does anyone know how to make it work?

A: 

All those folders are added to the assembly search path, so you can say something like Assembly.Load("test.dll"), without supplying absolute path.

I've tried this, but no success.
Rafael Romão