Skip to content

Azure Function Runtime Version

JohnReeson edited this page Aug 31, 2018 · 1 revision

There are two major versions: 1.x for .Net Framework and 2.x for .Net Standard.

Syntax

  1. Major version :~1 for 1.x , beta or ~2 for 2.x. With this format, function app on Azure is automatically updated to new minor versions of the runtime when they become available.
  2. Minor version 1.x:1.0.11959; 2.x: 2.0.11961-alpha, 2.0.12050-alpha. (All versions available right now). Function app on Azure is kept on that version until we explicitly change it.

Where to find

  1. Runtime version in Function app settings.
  2. FUNCTIONS_EXTENSION_VERSION in Application settings.

Configuration

Two scenarios we need to change runtime.

  1. Major version change. ~1 to beta/~2 or reverse.

    We may see prompt below if there are functions in the app.

    Major version upgrades can introduce breaking changes to languages and bindings. When upgrading major versions of the runtime, consider creating a new function app and migrate your functions to this new app.

    • In an empty function app(delete existing functions or create new app), change runtime in Function app settings.

    • We can directly set FUNCTIONS_EXTENSION_VERSION in Application settings if published project depends on another runtime.

  2. Minor version pinned to avoid breaking changes(probably the last time to use as 2.x is planned to be GA by this fall).

See breaking changes in 2.0.12050-alpha(beta), we can pin FUNCTIONS_EXTENSION_VERSION to 2.0.11961-alpha and follow steps to work with changes and move to beta.

Find more breaking changes to fix if our 2.x function runtime is pinned to some older version, which have all been removed on Azure.

Wrong version handler

If we specify a wrong version of 1.x like 1.0.14, Azure will leverage latest minor version instead. It is same with 2.x.

For local dev

Commonly speaking, local dev doesn't need runtime configuration because we choose Cli first(using tools like npm or VS does in background), we are clear about the major version at least.

Some local places to find function runtime version.

  1. VS, New Function project v1 or v2.
  2. VS/VSCode c# function, in functionappname.csproj, see <AzureFunctionsVersion>v2</AzureFunctionsVersion>.
  3. VSCode, functionapp/.vscode/setting.json, see "azureFunctions.projectRuntime": "beta"
  4. Function core tools(Cli), run func, we may see Function Runtime Version:2.0.12050.0
  5. Start a function app in VS/VSCode/Cli, besides 4, we can also see Cli output Starting Host (HostId=xx, InstanceId=xx, Version=2.0.12050.0, ..)

Clone this wiki locally