Custom Orchard Module not activating properly on a site created from

Topics: Writing modules
Sep 7, 2015 at 8:40 AM

I asked this question on SO last week but haven't got any answers there, so I'm hoping you can help me here!

I've created a custom module for Orchard and packaged it up as a .nupkg; and now I am testing deployment but I have hit a snag.

If I create a new Orchard site using the Web Platform Installer and install my module (by uploading the nupkg file), everything works fine - the module's single feature is enabled and its entry in the Admin menu appears.

If I build Orchard from source and install my module (again by uploading the nupkg file), everything works fine again.

If I create a site manually from (downloaded from the project's GitHub releases) the site works just fine. When I install my module by uploading the nupkg, the installation goes through without an error; the module appears in the Modules list and its feature can be enabled/disabled without reporting an error; but the module's Admin menu entry does not appear, nor does the widget it provides and the module's assemblies do not get added into dependencies.xml.

NOTE: my module is precompiled (this is the way we want to ship it) so it contains a bin folder with its assembly and some dependencies contained in it but the module folder does not contain a csproj file. Therefore it should be loaded by the PrecompiledExtensionLoader (at least as I understand that should be the case).

Things I have already checked:
  • Comparing the directories for the installation from Web Platform Installer and the installation created manually from with WinMerge, there do not appear to be any significant differences. Except that all of the modules listed in dependencies.xml in the WPI site are loaded using the PrecompiledExtensionLoader whereas the modules loaded on the manually created site are all loaded using the DynamicExtensionLoader - and as noted, my module is not listed in the dependencies.xml on the manually created site.
  • There is nothing logged in the Orchard error log and even when I turn up logging to INFO level and try uninstalling and reinstalling the module I see no messages that indicate an error.
  • Other modules can be loaded from the Gallery on the manually created site; although these are also loaded by the DynamicModuleLoader.
So does anyone have an idea why this module will load in the case of a site created by WebPI or by compiling the source and yet not load on a site created from the file.

Failing that, can anyone tell me how to get some more detailed logging out of the module loader?