Skip to main content
Build a DevOps superstar team with battle-tested Kubernetes templates. Choose Your Stack

Solved: Invalid combination of TargetFramework and AzureFunctionsVersion is set

Run into the following error while upgrading one of my Azure Function from .NET 5 to .NET 6.

Invalid combination of TargetFramework and AzureFunctionsVersion is set.

The reason that .NET 5 is supported by Azure Function v3 and .NET is supported by Azure Function v4.

Thus, these lines in project file should do the job:

<PropertyGroup>  
  <TargetFramework>net6.0</TargetFramework> 
  <AzureFunctionsVersion>v4</AzureFunctionsVersion>
  <OutputType>Exe</OutputType>
</PropertyGroup>

Share this article

About the Author

Alexander Lvovich

Alexander Lvovich

Solution Architect | Cloud-Native Platforms, DevOps & Service Mesh

💡 Kubernetes architecture, Istio service mesh, CI/CD, and cloud-native DevOps — from strategy to hands-on implementation. Reach out if you need expert support.


No comments are allowed for this post