The documentation (here and here) is notably lacking information on how references in modules are resolved:
References Resolution
(TODO: Explain how Orchard figures out references by looking at the "References" section of the csproj file as well as looking at additional assembly binaries dropped in each module "bin" directory)
Unfortunately, this is exactly the information that I need. I have created a custom module that has a reference to a custom-built, in-house DLL. When I try to use a class from this DLL, I get the following Exception:
Could not load type 'Custom.MyClass' from assembly 'Custom, Version=[version], Culture=[culture], PublicKeyToken=[token]'.
So, my question is thus: What does Orchard do with module references, and is there anything special I need to do to have Orchard pick up my module's references?
EDIT: Looks like some better information can be found in this blog post and its comments. However, my custom assembly already exists in src\Orchard.Web\App_Data\Dependencies
, and I'm still getting the error.
EDIT2: We have a copy of the custom DLL in the lib
folder, so I tried referencing that one instead (as we have another module that does so successfully), but still no change.
EDIT3:: In reference to the previous two edits, it's not copying from the lib
folder to the App_Data\Dependencies
folder. I just added a new DLL to the lib
folder and referenced it, and it didn't appear in the Dependencies
folder. I think the current Custom.dll
isn't replacing the one that's there, which is why I'm getting the error I am. But why isn't Orchard copying into the Dependencies
folder?
Dependencies
folder. (The module is in the right place - I created it using the orchard command line.) – Angeles