GitHub logo Choc13 / az-function-fsharp-net5

A minimal example of creating an Azure function using F# on .NET 5. with bonus GitHub actions deployment

Example Azure Function using F# on .NET 5

This repo shows a minimal example of how to write an Azure function using F# and run it on .NET 5 It also includes an example of deploying to Azure from your local machine and using GitHub actions.

Gotchas

There were several gotchas that were discovered when trying to get this to work which were often tricky to find in the existing documentation. In fact, all of these gotchas are related to using .NET 5 and apply equally to a C# project.

  1. Isolated .NET Host

    Running the function on .NET 5 requires an isolated .NET host Specifically, we have to set the environment variable FUNCTIONS_WORKER_RUNTIME to the value "dotnet-isolated" This is because the default host in the functions runtime is still using .NET Core 3.1. We have to set this in both the local.settings.json file for running locally and the …

View on GitHub