Ori*_*ian 3 azure azure-functions azure-functions-runtime azure-functions-core-tools
我已经下载了 azure-functions-core-tool@3 ,当我使用 Azure Tools 运行新创建的函数项目时,它似乎正在运行 v2,尽管我不确定。
该settings.json
文件如下:
{
"azureFunctions.deploySubpath": ".",
"azureFunctions.postDeployTask": "npm install",
"azureFunctions.projectLanguage": "JavaScript",
"azureFunctions.projectRuntime": "~3",
"debug.internalConsoleOptions": "neverOpen",
"azureFunctions.preDeployTask": "npm prune"
}
Run Code Online (Sandbox Code Playgroud)
但是,当我使用“npm start”或“func start”运行Azure函数时,标头部分报告:
Azure Functions Core Tools (2.7.2184 Commit hash: 5afacc827c2848e4debc23bb96604f1ffce09cc7)
Function Runtime Version: 2.0.12961.0
Run Code Online (Sandbox Code Playgroud)
后来在日志中我看到:
[warn] The Node.js version you are using (v12.17.0) is not fully supported by Azure Functions V2. We recommend using one the following major versions: 8, 10.
Run Code Online (Sandbox Code Playgroud)
这似乎意味着这些功能仍在 2.0 模式下运行。
如何确定正在执行哪个版本的运行时?
如果你看到
函数运行时版本:2.0.12961.0
您正在运行运行时 V2。
运行npm install -g azure-functions-core-tools@3
显式安装 V3 运行时,您将在本地运行 V3。
版本 2.x 和 3.x
版本 2.x/3.x 工具使用基于 .NET Core 构建的 Azure Functions 运行时。.NET Core 支持的所有平台都支持此版本,包括 Windows、macOS 和 Linux。
归档时间: |
|
查看次数: |
13522 次 |
最近记录: |