1

我在部署设置到我的 github 存储库 ( https://github.com/jthake/MicrosoftGraph-AzureFunctions/blob/master/MicrosoftGraphWebHook/ ) 的 Azure 函数时收到此错误。不幸的是,它不是很具体......调试它的正确方法是什么?

Microsoft.Azure.WebJobs.Host: Error indexing method 'Functions.MicrosoftGraphWebHook'. mscorlib: Multiple custom attributes of the same type found.
2016-04-06T00:29:25  Welcome, you are now connected to log-streaming service.

我在另一个线程中注意到了这个评论:

"As expcted, the Azure Functions runtime will automatically add the references to the package assemblies, so you DO NOT need to explicitly add assembly references using #r "AssemblyName", you can just add the required using statements to your function and use the types defined in the NuGet package you've referenced."

我尝试删除可能已经引用但随后在找不到程序集引用时抛出错误的 #r ref 东西。

4

1 回答 1

1

我认为问题在于您的function.json文件缺少 http 输出绑定。尝试添加一个如下所示。至于为什么该错误会导致您收到如此神秘的错误,这是我们需要修复的错误处理错误:)

{
  "bindings": [
    {
      "webHookType": "genericJson",
      "type": "httpTrigger",
      "direction": "in",
      "name": "req"
    },
    {
      "type": "http",
      "direction": "out",
      "name": "res"
    }
  ],
  "disabled": false
}
于 2016-04-06T01:20:33.633 回答