Azure functions 如何调试从NuGet软件包导入时出错

Azure functions 如何调试从NuGet软件包导入时出错,azure-functions,Azure Functions,我在部署设置为github repo()的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

我在部署设置为github repo()的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.
我注意到以下评论:


我试图删除#r ref这个东西,它可能已经被引用了,但是在找不到程序集引用时抛出了一个错误。

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


不幸的是,我也犯了同样的错误。我复制了你的站点内容示例@mathewc,并删除了你认为不需要的输出绑定。很高兴在function.js上进行一些验证,并在将来提供一些有用的消息。了解它现在是一个预览。我们有UserVoice吗?删除未使用的字符串变量会产生不同的错误。让我觉得它没有正确加载NuGet。2016-04-06T02:17:32.089函数“MicrosoftGraphWebHook”的脚本已更改。重新加载。2016-04-06T02:17:32.089编译函数脚本。2016-04-06T02:17:32.245(2,1):错误CS0006:找不到元数据文件“Microsoft.IdentityModel.Clients.ActiveDirectory”2016-04-06T02:17:32.245(8,17):错误CS0234:命名空间“Microsoft”中不存在类型或命名空间名称“IdentityModel”(是否缺少程序集引用?)2016-04-06T02:17:32.245编译失败。Jeremy,#r不是包引用所必需的。您是否使用CI部署您的功能?如果是这样,您是否使用自定义脚本来执行包还原?好的,所以我返回并再次重新加载#r ref(删除未使用的字符串引用后,我仍然得到缺少的程序集。这是project.json,我不是。我只是添加到package.json文件中。并根据Matthew的构建视频使用GitHub进行设置,以便每次提交都会重新部署。我应该吗?是的。目前,包在部署时没有处理,所以Matthew正在使用此部署。)脚本:。这是我们将要解决的问题。能否尝试将这两个文件复制到应用程序的根目录(映射到wwwroot),然后重试?
"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."
{
  "bindings": [
    {
      "webHookType": "genericJson",
      "type": "httpTrigger",
      "direction": "in",
      "name": "req"
    },
    {
      "type": "http",
      "direction": "out",
      "name": "res"
    }
  ],
  "disabled": false
}