首页 > 解决方案 > Azure 函数部署错误:您的函数应用面向 V1,但 Azure 主机的函数版本为 V2,

问题描述

我正在尝试使用 .net 核心部署我新创建的功能这是我的项目内容,我在 azure 上的功能配置为版本 2,FUNCTIONS_EXTENSION_VERSION 为 ~2。

<TargetFramework>netcoreapp2.1</TargetFramework>
<AzureFunctionsVersion>v2</AzureFunctionsVersion>

如果我在本地存储库上进行部署,则会引发此错误。

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

有什么想法我能做什么?

标签: c#azure-functions

解决方案


问题是我有一个未加载的单元测试 .net 4.7 项目。删除后,我可以发布到 azure。


推荐阅读