I have an existing function app with multiple functions, which all work as expected when declared with the default static class method signature.
I now want to rebuild this to make use of dependency injection and make asynchronous calls to blob storage.
Having followed this guide https://docs.microsoft.com/en-us/azure/azure-functions/functions-dotnet-dependency-injection, my function apps don't appear to do anything and i'm having issues trying to debug them.
I previously would use https://<functionappname>.scm.azurewebsites.net/ and use the debug option but this no longer appears to exist.
I noticed that a couple of packages had pending nuget updates so I upgraded the latest packages to their latest versions:
- microsoft.extensions.configuration.usersecrets
- microsoft.extensions.dependencyinjection
- microsoft.extensions.dependencyinjection.abstractions
now when i add a message to my queue in order to test my queue trigger function and view the monitor section i sometimes see a function failed log entry with no specific details, but nothing appears in the invocations list. my logging info from my app was not displayed so it appears the function just immediately bombed out even though the queuetrigger picked up the queue msg.
my next step will be to create a fresh function app and implement it step by step, for example just try ILogger first and then add my own dependencies one by one.
in the interim i was wondering whether anyone else has stumbled across this and has any experience with resolving this.
i am developing my function app in .net core 3.1 & and attempting to deploy to a linux hosted consumption plan.
so things that would help:
1) how can i now debug this? application insights does not appear to be an option
2) any pointers to implementing DI within function apps? i saw an alternative post suggesting having your startup class inherit from IWebJobsStartup instead, but that doesn't appear to help at all
3) does anyone have a better guide to follow? the microsoft blog post i followed was only written 2 weeks ago so i would expect to work
thanks