无法将参数"log"绑定到TraceWriter类型 [英] Cannot bind parameter 'log' to type TraceWriter

查看:75
本文介绍了无法将参数"log"绑定到TraceWriter类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在右键单击项目->调试->启动新实例时获得以下消息.

Getting the below message when doing right click project -> Debug -> Start New Instance.

[1/7/2018 6:48:54 AM]发生ScriptHost错误[1/7/2018 6:48:54 AM]执行的HTTP请求:{[2018年1月7日6:48:54 AM] Microsoft.Azure.WebJobs.Host:错误索引方法 'TestFilesIngestJobs.RunScheduleAsync'. Microsoft.Azure.WebJobs.Host:无法绑定参数"log"以键入 TraceWriter.确保绑定支持参数类型". 如果您使用的是绑定扩展(例如ServiceBus,Timer等) 确保您已调用扩展程序的注册方法 在您的启动代码中(例如config.UseServiceBus(),config.UseTimers(), 等等.). [2018年1月7日6:48:54 AM]"requestId": "dbb282d7-44e2-44b4-907e-877beac9da2d",[1/7/2018 6:48:54 AM]错误 索引方法'MasterDataFilesIngestJobs.RunScheduleAsync'[1/7/2018 6:48:54 AM]"method":"GET",

[1/7/2018 6:48:54 AM] A ScriptHost error has occurred[1/7/2018 6:48:54 AM] Executed HTTP request: { [1/7/2018 6:48:54 AM] Microsoft.Azure.WebJobs.Host: Error indexing method 'TestFilesIngestJobs.RunScheduleAsync'. Microsoft.Azure.WebJobs.Host: Cannot bind parameter 'log' to type TraceWriter. Make sure the parameter Type is supported by the binding. 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.). [1/7/2018 6:48:54 AM] "requestId": "dbb282d7-44e2-44b4-907e-877beac9da2d", [1/7/2018 6:48:54 AM] Error indexing method 'MasterDataFilesIngestJobs.RunScheduleAsync' [1/7/2018 6:48:54 AM] "method": "GET",

推荐答案

要使此方法在您的计算机上运行,​​您必须做两件事.请遵循此链接

For This to work on your machines, you will have to do two things. Follow the Visual Studio section in this link

  1. 安装Azure-functions-core-tools @ core软件包是使用以下方法安装的 npm.
  2. 按如下所示创建调试配置文件和设置,并使用该配置文件 从Visual Studio启动配置文件时.
  1. Install Azure-functions-core-tools@core package is installed using npm.
  2. Create a debug profile and setup as shown below and use that profile while launching it from visual studio.

请找到下面的图片以获取帮助.

Please find the image below for your help.

这篇关于无法将参数"log"绑定到TraceWriter类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆