@Alex Perez Thank you for reaching out to Microsoft Q&A. Based on my understanding, you are using a dependency injection FileFeedAlertProcessor and when trying to initialize, facing the below error with line: builder.Services.BuildServiceProvider().GetRequiredService<FileFeedAlertProcessor>(); in .dotnet (works with dotnet-insolated). Is that correct?
'Unable to resolve service for type 'Microsoft.Azure.WebJobs.Script.IFileLoggingStatusManager' while attempting to activate Microsoft.Azure.WebJobs.Script.Diagnostics.HostFileLoggerProvider'.'
Refer to docs: Caveats which describes startup class is meant only for set up and registration and the above would not work since ILogger cannot be injected at this point. Check #5782 comment by our product team on this issue.
Based on a discussion with our product team, IHostedService is not supported in-proc scenario (which is ultimately you want in this scenario). If you still prefer to achieve this way, then you can create either a new HostBuilder() inside the startup or a new class without DI and run it. But please note long-running classes are really not recommended. If you have any feedback related to this feature or product, feel free to submit via Azure Functions directly to our product team. I will also share the feedback internally with them.
Also, would like to let you know that our roadmap is going to be on dotnet-isolated and refer https://techcommunity.microsoft.com/t5/apps-on-azure-blog/net-on-azure-functions-roadmap/ba-p/2197916 describing the same.
I hope this answers your question and feel free to add a comment if you have any other questions. We would be happy to assist you. Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community.