Edit

Share via


Register Azure Functions binding extensions

The Azure Functions runtime natively runs HTTP and timer triggers. The behaviors of the other supported triggers and bindings are implemented in separate extension packages.

.NET class library projects use binding extensions that are installed in the project as NuGet packages.

Extension bundles allow non-.NET apps to use binding extensions without having to interact with .NET infrastructure.

Extension bundles

Extension bundles add a predefined set of compatible binding extensions to your function app. Extension bundles are versioned. Each version contains a specific set of binding extensions that are verified to work together. Select a bundle version based on the extensions that you need in your app.

When you create an Azure Functions project from a non-.NET template, extension bundles are already enabled in the app's host.json file.

When possible, use the latest version range to obtain optimal app performance and access to the latest features. To learn more about extension bundles, see Azure Functions extension bundles.

In the unlikely event you can't use an extension bundle, you must instead explicitly install extensions.

Explicitly install extensions

For compiled C# class library projects, you install the NuGet packages for the extensions that you need as you normally would in your apps. For more information, see the Visual Studio Code developer guide or the Visual Studio developer guide.

Make sure to obtain the correct package because the namespace differs depending on the execution model:

Execution model Namespace
Isolated worker process Microsoft.Azure.Functions.Worker.Extensions.*
In-process Microsoft.Azure.WebJobs.Extensions.*

Functions provides extension bundles for non-.NET projects, which contain a full set of binding extensions that are verified to be compatible. If you're having compatibility problems between two or more binding extensions, review compatible combinations of extension versions. For supported combinations of binding extensions, see the extension bundles release page.

There are cases when you can't use extension bundles, such as when you need to use a specific prerelease version of a specific extension. In these rare cases, you must manually install any required binding extensions in a C# project file that references the specific extensions required by your app. To manually install binding extensions:

  1. Remove the extension bundle reference from your host.json file.

  2. Use the func extensions install command in Azure Functions Core Tools to generate the required extensions.csproj file in the root of your local project.

    For portal-only development, you need to manually create an extensions.csproj file in the root of your function app in Azure. To learn more, see Manually install extensions.

  3. Edit the extensions.csproj file by explicitly adding a PackageReference element for every specific binding extension and version required by your app.

  4. Validate your app functionality locally and then redeploy your project, including extensions.csproj, to your function app in Azure.

As soon as possible, you should switch your app back to using the latest supported extension bundle.

Next steps