This project is read-only.

Problem with run-time compiling with external dependency

Topics: Troubleshooting
Jul 14, 2011 at 9:51 AM

I have an issue while running a module that has external project dependencies (external from Orchard-modules, that is).


I have a module that requires some web-service references, which I stuck in a library that is totally independant from Orchard. While running this however, I get the following exception:

Parser Error Message: Error compiling module "JF.Module.Articles" from file "/jf/Modules/JF.Module.Articles/JF.Module.Articles.csproj":
The assembly reference 'JF.Alwin' could not be loaded.


I can compile the module-project by itself just fine. The only way I've made this work is if I added JF.Module.Articles as a reference to Orchard.Web, but then I have to remove and readd it every time I make changes - otherwise they're cached somehow.

How do I make it so it compiles fine without adding the reference to Orchard.Web?

Jul 14, 2011 at 7:58 PM

Where is the "JF.Alwin.dll" located after you build "JF.Module.Articles" (I'm assuming you are using Vistual Studio)?

Jul 15, 2011 at 7:27 AM

It is placed in Orchard.Web/Modules/JF.Module.Articles/bin

And you are correct in assuming so. :)

Jul 15, 2011 at 7:38 AM

Hm. There was however some old files lying in some of the other folders (orchard.web/bin, and app_data/dependencies). After clearing them out and removing all added references it seems to be working :) Could it be some kind of mismatch between different version binaries of the same assembly cause this?