Module Assembly Reference

Topics: Core, Writing modules
Aug 14, 2012 at 6:40 AM

Hi Experts,

Just a simple killing question:

If we took for example  an Orchard.ImportExport

we would see that it easily uses Orchard.Recipes assembly.

But I cannot find any traces of reference neither in Bin nor in References.

Please, enlighten me what do I miss?

In other word. If I need a reference in a module for some other module how do I do it?

Aug 14, 2012 at 3:17 PM

Right click on the solutions references and click add reference. Than rebuild the solution so the dll's are in the bin folder.

Aug 17, 2012 at 12:56 PM

This is just an idea that maybe with Orchard.ImportExport for example that the reference for Orhcard.Recipes is being inherited do to some other reference in the Bin or References. Like Orchard.Framework or Orchard.Core...

Again just an idea and something I'm looking into, but most of the time when I need to make reference to another module and don't know about it Orchard will tell me in a red box over the site in the admin page. 

Aug 17, 2012 at 1:06 PM
Edited Aug 17, 2012 at 1:07 PM

By removing the Reference Orchard.Framework I lost reference to Orchard.Recipes.Models in the ImportExportService, So in other words if you remove a reference in a module it will break the reference.

Looking in the Orchard.Framework and just for fun the Orchard.Core did not find any references to Orchard.Recipes(thought it would the module) but that is because Orchard.Recipes is a folder in Orchard Framework. Either way this is how i found the reference and its location. Hope this all helps. :)

-Note that the Orchard.Recipes in framework has models and the Module does not? Thats also another key to look at in find the right reference.