"Could not load file or assembly" error on trying to access auxillary assemblies from COM
- by Codex
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.