This project is read-only.

INavigationProvider. Where does IoCC (Autofac) inject dependency.

Topics: Core, Writing modules
Nov 7, 2012 at 1:11 PM

I have a problem.  I use AdminMenu class inherited from INavigationProvider. But I can't see this menu item on back end.

I look through the code and find NavigationManager class that has private readonly field IEnumerable<INavigationProvider> _navigationProviders - this filed is injected into class constructor. 

When I launch debugger, i don't find my class in _navigationProviders collection, and i thing this is the couse of the problem. I can't find where Autofac incected INavigationProvider interface into NavigationManager. Orchard version 1.5.

Please help me.

Nov 7, 2012 at 7:50 PM
Edited Nov 7, 2012 at 7:58 PM

Have you enabled your module? If you set a breakpoint in your navigation provider's constructor, does it get hit? Are you seeing any errors pertaining to your module in App_Data/Logs?

Nov 8, 2012 at 5:06 PM

The module is enabled but constructor is not executed. There are not any error in App Data Logs. Any suggestions ?

Nov 9, 2012 at 8:28 AM

Is any other part of your module working (content parts, controllers etc)? Do you see any build errors for your module in VS? When you set a break point in your module, during debugging is it solid red or just an outline?

Dec 22, 2012 at 7:22 AM

Solved. I saw error in App_Data/Logs.

Thank for help.