You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are trying Dependency Injection with Autofac to our Azure Functions. We have a startup class [assembly: WebJobsStartup(typeof(Startup))] which calls the ConfigureServices. The out-of-the-box dependency injection with .net core works fine, but we are trying Dependency Injection with Autofac and we are unable to inject our service classes into Azure Function constructor.
When we try to Resolve the dependencies using "Resolve" keyword of IContainer from Autofac, I'm able to resolve the service. Any help in this regard would be highly appreciated.
The text was updated successfully, but these errors were encountered:
Thank you for your reply. I'm using Autofac Nuget package.
Just to be more clear, I'm NOT using "AzureFunctions.Autofac", I'm only using "Autofac".
I do not have static function class and static function method, I have a function class with Constructor to which I'm trying to inject the services.
This is the repo for AzureFunctions.Autofac. Since you have stated that you are not using this package the issue is not with this package. Please open an issue on the official Autofac repository or stack overflow for help.
We are trying Dependency Injection with Autofac to our Azure Functions. We have a startup class [assembly: WebJobsStartup(typeof(Startup))] which calls the ConfigureServices. The out-of-the-box dependency injection with .net core works fine, but we are trying Dependency Injection with Autofac and we are unable to inject our service classes into Azure Function constructor.
When we try to Resolve the dependencies using "Resolve" keyword of IContainer from Autofac, I'm able to resolve the service. Any help in this regard would be highly appreciated.
The text was updated successfully, but these errors were encountered: