Azure Functions 预编译和 Blob 触发器 : The function type name is invalid

标签 azure azure-functions

我尝试部署使用 Blob 触发器的预编译 Azure 函数。 发布函数后,我在 Kudu 中出现以下错误,并且我的函数未执行:

2017-05-30T14:34:11.436 Starting Host (HostId=sfl-data-forecast-dev-funcs, Version=1.0.10945.0, ProcessId=17328, Debug=True, Attempt=0)
2017-05-30T14:34:11.436 Development settings applied
2017-05-30T14:34:11.436 No job functions found. Try making your job classes and methods public. If you're using binding extensions (e.g. ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. config.UseServiceBus(), config.UseTimers(), etc.).
2017-05-30T14:34:11.436 Job host started
2017-05-30T14:34:11.436 The following 1 functions are in error:
Import: The function type name 'Forecasts.Functions.ImportForecastsFunction' is invalid.

我不明白为什么会出现这个错误。 Azure功能位于一个针对框架4.6.1的Web项目中。添加了 WebJob SDK 和扩展 nuget 包。我已将 Newtonsoft.Json 降级到版本 9.01,但它没有改变任何内容。

我有以下 function.json:

{
  "scriptFile": "..\\bin\\SFL.Data.Forecasts.Functions.dll",
  "entryPoint": "SFL.Data.Forecasts.Functions.ImportForecastsFunction.Run",
  "bindings": [
    {
      "name": "file",
      "type": "blobTrigger",
      "direction": "in",
      "path": "forecasts/{name}",
      "connection": "HotStorageAccount.ConnectionString"
    }
  ],
  "disabled": false
}

最佳答案

面临同样的异常。结果发现运行时版本无效。错误地定义为 ~1,即使该函数引用 netcore2.1,运行时版本 1 也不支持。

特别是,无效版本是由基于 ARM 模板的资源组部署导致的,将函数应用的参数 FUNCTIONS_EXTENSION_VERSION 定义为 ~1 而不是 ~2。

关于Azure Functions 预编译和 Blob 触发器 : The function type name is invalid,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44265750/

相关文章:

python - 如何根据服务主体 ID 限制对 azure 函数的访问

Azure CDN从后端获取数据

azure - 使用 azure secret 提供者类进行 kustomize

c# - 如何将邮件从我的服务器重定向到中继邮件服务器? ( azure )

c# - Azure Functions 和 Azure Durable Function 之间有什么区别

azure - 参数 "storage_connection_string"是必需的,但未找到定义

azure - MS Azure 数据工厂 ADF 从 BLOB 到 Azure Postgres Gen5 8 核心的复制事件失败,连接因主机错误而关闭

Azure ssh 到 Web 应用程序失败 : AppServiceTunnel/Tunnel. ashx?GetStatus',状态代码 '404' 和原因 'Not Found'

Azure Function App 发布后控制台 UI 中缺少功能

azure - 如果超时超过 10 分钟,Python Azure Functions 会发出警报