首页 > 解决方案 > 将预编译的 f# 函数部署到 Azure Functions v2

问题描述

我创建了包含两个函数的 af# 项目。我可以在本地运行这些论文,也可以在运行时运行(或在 VS Code 中func start使用它开始调试)。F5这两个函数之一将数据从一个 azure 存储容器复制到另一个,另一个函数从数据库复制一些数据并将其放入 azure 存储容器中。当我在本地运行它时,这一切都很好。现在我想将这些部署到 Azure Functions。我创建了一个资源组,创建了函数应用程序并确保函数应用程序设置表明它是 Azure 函数版本 2。当我尝试通过以下方式部署函数时:

func azure functionapp publish <FUNCTION APP NAME>

代码将上传到 Azure。输出是:

Getting site publishing info...
Creating archive for current directory...
Uploading archive...
Upload completed successfully.
Syncing triggers...

在部署选项下的 Azure 门户中,我看到已触发部署,并查看了我获得的最新部署的详细信息:

周一 09/17 更新子模块。
2017 年 9 月星期一准备部署提交 id '75833a2816'。
周一 09/17 生成部署脚本。查看日志
Mon 09/17 正在运行部署命令... 查看日志
Mon 09/17 正在运行部署后命令...
Mon 09/17 成功同步 2 个有效负载大小为 317 字节的函数触发器。
周一 09/17 部署成功。

这似乎表明已经找到并成功部署了两个功能。但是,这些功能并未在 Function App 下的 Functions 下列出。而且我无法成功地打电话给他们。

是否必须提供一些额外的配置才能将 F# 应用程序作为 Azure Function v2 运行?

标签: azureazure-functions

解决方案


这是我在 Function App 的日志中看到的内容BokioMLDataExtractorFunctionsTest

CopyImagesToBokioAIStorage: Invalid script file name configuration. The 'scriptFile' property is set to a file that does not exist.
CopyOcrToBokioAIStorage: Invalid script file name configuration. The 'scriptFile' property is set to a file that does not exist.

这就是为什么这两个功能没有出现的原因。希望这有助于解决问题?


推荐阅读