Try for free Book a demo

Azure Durable Functions CI/CD Issue Solved!

Microsoft Azure

2 Mins Read | Last modified on July 26th, 2024

Azure Durable Functions CI-CD Issue Solved

Introduction

This blog explains a peculiar issue faced when Azure Durable Functions are deployed using Azure DevOps.

In case you need to know what Azure Durable Functions are, please refer to Microsoft’s documentation on Durable Functions here as the explanation of it, is not under the scope of this blog.

Durable functions work best when built with versions .NET Core 2.2 and above. After developing and testing a durable function, it can be deployed to Azure in many ways. Deploying using Visual Studio also works fine.

Azure DevOps is Microsoft’s CI/CD offering and Microsoft’s documentation on deploying Azure Functions to the cloud can be viewed here.

You need to select the correct templates for build and release.

Azure Durable Functions CI/CD Issue
Deploy Azure Durable Functions

Problem Context

“Microsoft.Azure.WebJobs.Host: Error indexing method ‘MyFunction’. Microsoft.Azure.WebJobs.Host: Cannot bind parameter ‘starter’ to type DurableOrchestrationClient. Make sure the parameter Type is supported by the binding. If you’re using binding extensions (e.g. Azure Storage, ServiceBus, Timers, etc.) make sure you’ve called the registration method for the extension(s) in your startup code (e.g. builder.AddAzureStorage(), builder.AddServiceBus(), builder.AddTimers(), etc.)”

Triaging

Deployed with Azure DevOps

Durable Functions generate a file extensions.json to load all dependent types for execution. When deployed with Azure DevOps or any other CI/CD, the extensions.json fails to get deployed.

Proposed Resolution

Several Github threads have been raised for this issue. This thread is an example. After several trials and errors, the right packages required in the .csproj file of the Azure functions project are mentioned below.

right packages

Hack

If the above resolution doesn’t fix the issue, please try the below steps.

  1. Build the solution with Visual studio.
  2. Go to the \bin\Debug\netcoreapp2.2\bin You should be able to see the extensions.json file generated.
  3. Add the file to the Azure Function project in Visual studio.
  4. Add the snippet below to the .csproj file of the project.

Resolving CI/CD Issue

  1. extensions.json should get deployed from there on. The file can then be deleted from the project after the issue is resolved.

Conclusion

Microsoft is aware of this issue and is expected to be resolved in the future.

Aslo, check out our blog Azure Durable Functions for a better understanding of key concepts and use cases.

This article was originally published on Aug 13, 2020. It was most recently updated on Jul 26, 2024.

Azure Functions - Request Demo CTA

Related Articles