"Could not load file or assembly" error on trying to access auxillary assemblies from COM
Posted
by Codex
on Stack Overflow
See other posts from Stack Overflow
or by Codex
Published on 2010-05-18T12:07:33Z
Indexed on
2010/05/18
12:10 UTC
Read the original article
Hit count: 374
We have the project structure as follows:
COMExposedCCW.dll -refers-> BusinessLayer.dll -refers-> Utils.dll
COMExposedCCW.dll -refers-> Utils.dll
The COMExposedCCW.dll has been registered for COM interop.
From the COM application{Excel} we can successfully create the CCW object and access its properties, but when we try to invoke methods that refer to the Business/Utils layer, it throws an exception that the file or assembly{Business/Utils} could not be found.
The Business/Utils dlls are present in the same folder as the CCW.
On copying the Business/Utils to the COM application directory it works fine.
I've tried the following:
- Set "HintPath/>" in the CCW project
I dont want to dynamically load the assemblies using Reflection {there should be a more elegant solution}
Thanks in advance.
© Stack Overflow or respective owner