1
votes

I'm trying to set up continuous integration for my Function App with GitHub. The initial pull from my repo shows that it worked as it shows "Success (Active)". However subsequent updates to the branch are all failing with the following error:

Your function app is targeting V1, but Azure host has function version V2, please change the version using the portal or update your 'FUNCTIONS_EXTENSION_VERSION' appsetting and retry

I have confirmed the FUNCTIONS_EXTENSION_VERSION value is set to ~2 in the portal. My function app runtime version is 2.0.12134.0 (~2) as defined in the web portal.

My host.json is also set to 2.0.

{
  "version": "2.0"
}

Is there another place (locally) where the version would be defined?

runtimeversion git

functionversion

1
There seem to be an issue for that on github. (and a workaround as well) github.com/Azure/Azure-Functions/issues/921Sebastian Achatz
Adding <AzureFunctionsVersion>v2</AzureFunctionsVersion> (from your link provided) resolved this issue. Please post an answer and I'll accept it. Thanks :)Jason Shave

1 Answers

2
votes

The issue can be solved by adding <AzureFunctionsVersion>V2</AzureFunctionsVersion> in the .csproj file (below the <TargetFramework> setting).

Seems to be an open issue which can be tracked here: https://github.com/Azure/Azure-Functions/issues/921