0
votes

I've migrated a consumption plan hosted Azure Function to be hosted on a App Service plan. To do so, I had to delete the function and recreated it in the plan. After deploying the function using Azure DevOps I'm getting the following error message

Function (somefunction/somemethod) Error: The binding type(s) 'serviceBusTrigger' are not registered. Please ensure the type is correct and the binding extension is installed.

function.json file

{
  "generatedBy": "Microsoft.NET.Sdk.Functions-1.0.24",
  "configurationSource": "attributes",
  "bindings": [
    {
      "type": "serviceBusTrigger",
      "connection": "ServiceBusConnection",
      "queueName": "%queueName%",
      "name": "myQueueItem"
    }
  ],
  "disabled": false,
  "scriptFile": "../bin/somefunction.dll",
  "entryPoint": "schema.somefunction.Run"
}

The App is currently on .Net Core 2.1

1

1 Answers

1
votes

I believe the issue was around the App being an old V1 function app and when being run in a consumption plan this worked fine. To get this working after the migration I upgraded and installed required NuGet packages by installing 'ExtensionsMetadataGenerator' and upgrading the function to V3.

<PackageReference Include="Microsoft.Azure.WebJobs" Version="3.0.16" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.ServiceBus" Version="4.1.1" />
<PackageReference Include="Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator" Version="1.1.8" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.7" />