Cannot bind parameter #39;log#39; to type TraceWriter(无法将参数“日志绑定到类型 TraceWriter)
问题描述
右键项目->调试->启动新实例时得到以下消息.
<块引用>[1/7/2018 6:48:54 AM] 发生 ScriptHost 错误[1/7/2018 6:48:54AM] 执行的 HTTP 请求:{ [1/7/2018 6:48:54 AM]Microsoft.Azure.WebJobs.Host:索引方法错误'TestFilesIngestJobs.RunScheduleAsync'.Microsoft.Azure.WebJobs.Host:无法将参数日志"绑定到类型TraceWriter.确保绑定支持参数类型.如果您使用绑定扩展(例如 ServiceBus、Timers 等)确保您已调用扩展程序的注册方法在您的启动代码中(例如 config.UseServiceBus()、config.UseTimers()、等等.).[2018 年 1 月 7 日上午 6 点 48 分 54 秒] requestId":dbb282d7-44e2-44b4-907e-877beac9da2d",[1/7/2018 6:48:54 AM] 错误索引方法MasterDataFilesIngestJobs.RunScheduleAsync"[2018 年 1 月 7 日上午 6 点 48 分 54 秒]方法":获取",
要让这个在你的机器上工作,你必须做两件事.遵循此
Getting the below message when doing right click project -> Debug -> Start New Instance.
[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
- Install Azure-functions-core-tools@core package is installed using npm.
- 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.
这篇关于无法将参数“日志"绑定到类型 TraceWriter的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:无法将参数“日志"绑定到类型 TraceWriter


基础教程推荐
- C# 9 新特性——record的相关总结 2023-04-03
- 重新排序 WPF TabControl 中的选项卡 2022-01-01
- 在 VB6 或经典 ASP 中使用 .NET 2022-01-01
- SonarQube C# 分析失败“不是指针的有效行偏移" 2022-01-01
- Mono https webrequest 失败并显示“身份验证或解密失败" 2022-01-01
- 更新 Visual Studio 中的 DataSet 结构以匹配新的 SQL 数据库结构 2022-01-01
- 如果条件可以为空 2022-01-01
- 从 C# 控制相机设备 2022-01-01
- 获取C#保存对话框的文件路径 2022-01-01
- 将数据集转换为列表 2022-01-01