See here & here for why I'm trying to do this.
I have a custom module that I'm building (and which is it's own .csproj in the Orchard .sln, as normal)
I have a (relatively complex) dependency that I wish to inject into Orchard. Currently if I build and run the code it's perfectly happy until it hits my dependency at which point it null-refs (as I'd expect it to). I can access the admin site and any pages that don't reference the dependency.
I add a reference to Autofac to my project. -> All fine.
I add the following class:
using System;
using Autofac;
namespace MyCustom.Module.Namespace
{
public class LoaderModule
{}
}
Everything is still fine - I rebuild and still get the expected behaviour.
Then I make my LoaderModule
derive from Autofac.Module
as instructed elsewhere:
using System;
using Autofac;
namespace MyCustom.Module.Namespace
{
public class LoaderModule : Autofac.Module
{}
}
And suddenly I'm getting "The resource cannot be found." 404s from IIS for the entire Orchard site - including admin site and content pages which done't hit the dependency.
Help!?