Error: More than one package matched with specified pattern Azure Function Release Pipeline in Azure DevOps

Error: More than one package matched with specified pattern Azure Function Release Pipeline in Azure DevOps

我已经在 Azure DevOps 中为我的 Azure Function 成功配置了 build 管道配置。现在我正在使用 Azure App Service Deploy 任务配置发布管道,但我总是收到错误消息“Error: More than one package matched with specified pattern: d:\a\r1\a\**\*.zip. Please restrain the search pattern.

有人遇到过这个问题吗?非常感谢任何帮助。

我终于弄清楚了问题所在。这背后的原因是,你的解决方案中有很多项目,每个项目在工件中都有自己的 zip 文件夹,所以要解决这个问题,我们应该在管道任务的包部分指定我们的 Azure 函数项目。

单击“Azure 应用服务部署”任务并转到“包”或“文件夹”部分,然后单击三个点。

现在您应该可以选择 select 正确的 zip 文件。

现在重新创建发布,应该可以看到发布成功了。

希望对您有所帮助。