我正在使用 Azure CLI (2.0.60) 和 Azure Function Core Tools (2.7.1505)(均在 Mac 上使用 npm 安装)来创建 Python 3.6 Function App。
使用 func new
创建函数并选择需要扩展的绑定(bind)模板时,出现以下错误
1. Azure Blob Storage trigger
2. Azure Cosmos DB trigger
3. Azure Event Grid trigger
4. Azure Event Hub trigger
5. HTTP trigger
6. Azure Queue Storage trigger
7. Azure Service Bus Queue trigger
8. Azure Service Bus Topic trigger
9. Timer trigger
Choose option: 7
Azure Service Bus Queue trigger
The Azure Service Bus Queue trigger template has extensions.
Extensions command requires dotnet on your path.
Please make sure to install dotnet (.NET Core SDK) for your system
from https://www.microsoft.com/net/download
但是,documentation明确指出
You can bypass the requirement for installing the .NET Core 2.x SDK by using extension bundles.
我的 host.json
文件是根据文档:
{
"version": "2.0",
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[1.*, 2.0.0)"
}
}
我想在不安装 .NET 的情况下使用 Azure Functions。我能做什么?
附:我和同事核实过。他们报告了同样的问题
- Docker 化的 Ubuntu
- Windows cmd
最佳答案
解决方法是手动更新/创建函数,然后使用 func start
。虽然 func new
存在此问题,但 func start
对应项完全能够处理扩展绑定(bind)。这似乎是 func new
中的一个错误。
关于python - 无法在没有 .NET Azure Python Function App v2 的情况下创建函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57378778/