-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load extensions from subfolders (Please Help) #8741
Comments
Hello guys, I saw this section in the documentation: "Once Orchard has collected all the Module.txt files from the discovery phase, Orchard uses distinct strategies (or "Module Loaders") to load these modules in memory. Internally, the act of "loading a module" is an activity that takes a Module.txt file as input and returns a list of System.Type as output. Note that this is slightly more generic than simply returning a System.Assembly, as But how? |
I'm not entirely familiar with the details of module/feature loading. Looking at how the Regarding paths other than modules, I think you need something like
in your web.config, but I have never tried it. Notes:
|
Thanks for your response. As I said above, I want something similar to core modules. And as I mentioned, I know about the web config settings. That setting doesn't solve my need because those settings only allow modules to be loaded from another location, but each module must have its own project and assembly file. I need exactly what is mentioned in the documentation, that is, The Core modules have their own loaders. I have also created a special loader for my modules. But the question is about how to introduce this loader to the system. |
The That shouldn't need any additional code, by the looks of it, but I haven't tested it. Perhaps you have already and can say why that isn't working as I think it should? |
You need two things to have a module and to be able to activate its features.
Therefore, because I want to reduce the number of assemblies and references, this feature is not useful for me. |
Hi guys
I have an important problem and although I spent a lot of time on it, I could not solve it.
Considering that the number of my modules is very large and the compilation of this number of projects becomes very large due to frequent references to Orchard modules and my modules, I am forced to merge some of these modules, but I want to each sub module be placed in separate subfolder like
Orchard.Core
.I know that orchard has the ability to place the module in the desired folder through the settings in the
web.config
, but this feature is not useful for me because I want to have a project likeOrchard.Core
and different modules as its subfolders without having.csproj
file and separate references for each sub module.According to the discussion here and many studies and countless tests, I failed to do this.
Using
Autofac.Module
and overridingLoad
method, I tried to create a newIExtensionFolders
andIExtensionLoader
exactly similar to the ones implemented forOrchard.Core
modules. But apparently my implementationse joins the system late and is not available in the phase thatOrchard
needs.Although I managed to make the desired modules appear in the list of features, but when I want to activate it, I get this error:
No loader found for feature's ("Test") exension!
Please guide me how I can solve this problem and use the
Autofac.Module
to introduce the desired subfolders and loader.Another problem is that I don't want to change the Orchard code. How can I put such a code that is needed in the startup phase in a module that is loaded with a delay and must be activated?
@sebastienros , @LombiqTechnologies , @Ermesx , @qt1 , @bleroy
The text was updated successfully, but these errors were encountered: