无法将参数 'log' 绑定到类型 TraceWriter
Cannot bind parameter 'log' to type TraceWriter
右键单击项目 -> 调试 -> 启动新实例时出现以下消息。
[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",
在 Visual Studio 2017 年的一个全新的 Function 项目中遇到了同样的错误。在收到 Visual Studio 将 Azure Function 升级到 v1.0.7 的提示后,我摆脱了错误
要使它在您的机器上运行,您必须做两件事。按照此 link
中的 Visual Studio 部分
- 安装 Azure-functions-core-tools@core 包安装使用
npm。
- 如下所示创建调试配置文件和设置并使用它
从 visual studio.
启动时配置文件
请查找下图以获取帮助。
我遇到了同样的问题,并通过更新 Azure Functions 和 Web Jobs Tools 修复了它。
请注意,根据此处的更改列表,对 V2 功能的远程调试的支持仅在 15.0.31201.0 中启用,并在 15.0.31201.0 中获得了错误修复
15.0.40108.0。
https://github.com/Azure/Azure-Functions/blob/master/VS-AzureTools-ReleaseNotes.md
因此,进入“工具和扩展”,查看您拥有的 Azure Functions 和 Web Jobs Tools 的版本,如果它早于 15.0.40108.0,请升级它。
右键单击项目 -> 调试 -> 启动新实例时出现以下消息。
[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",
在 Visual Studio 2017 年的一个全新的 Function 项目中遇到了同样的错误。在收到 Visual Studio 将 Azure Function 升级到 v1.0.7 的提示后,我摆脱了错误
要使它在您的机器上运行,您必须做两件事。按照此 link
中的 Visual Studio 部分- 安装 Azure-functions-core-tools@core 包安装使用 npm。
- 如下所示创建调试配置文件和设置并使用它 从 visual studio. 启动时配置文件
请查找下图以获取帮助。
我遇到了同样的问题,并通过更新 Azure Functions 和 Web Jobs Tools 修复了它。
请注意,根据此处的更改列表,对 V2 功能的远程调试的支持仅在 15.0.31201.0 中启用,并在 15.0.31201.0 中获得了错误修复 15.0.40108.0。 https://github.com/Azure/Azure-Functions/blob/master/VS-AzureTools-ReleaseNotes.md
因此,进入“工具和扩展”,查看您拥有的 Azure Functions 和 Web Jobs Tools 的版本,如果它早于 15.0.40108.0,请升级它。