Mysterious error preventing Azure function from run (Webjob/servicebus)

Richard Jonas 1 Reputation point

I've previously deployed an Azure function (.net core 3.1) and all worked.

I've redeployed it and I've got the following error at the function app level.

Microsoft.Azure.WebJobs.ServiceBus: Method not found: 'Microsoft.Azure.WebJobs.IWebJobsExtensionBuilder Microsoft.Azure.WebJobs.WebJobsExtensionBuilderExtensions.ConfigureOptions(Microsoft.Azure.WebJobs.IWebJobsExtensionBuilder, System.Action`3<Microsoft.Extensions.Configuration.IConfiguration,System.String,!!0>)'.

I've rolled back to the code that previously deployed and attempted to deploy various different versions of libraries and to different deployment slots, all with the same error. My functions run correctly when they run locally.

Does anyone have any insight as to what might cause this error - I suspect some incompatible libraries but the error isn't that helpful?

Thanks, Richard

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
3,692 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 63,511 Reputation points

    Hi @Richard Jonas

    Welcome to Microsoft Q&A! Thanks for posting the question.
    As you have mentioned that the function runs locally but not in azure then I will suggest you to check dot net runtime and SDK's that are running locally as well in azure.
    To run the command in azure function you can navigate to kudo console (Navigating to --> Debug Console Option) and run the below commands:
    dotnet --list-sdks
    dotnet --list-runtimes

    Please verify the targeting version whether it is 3.1 or 5.0? The error could be as the function doesn't support v5 packages. Please make sure that you have removed the v5 dependency nuget packages and make sure your packages are all v3 that supported by functions.

    Sharing discussion to not mix .NET Core 3.1 and .NET5 packages when working with Azure Functions.

    0 comments No comments