Cannot bind parameter 'log' to type TraceWriter

醉酒当歌 提交于 2019-11-28 03:50:05

问题


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",


回答1:


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

  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.




回答2:


I got same thing and fixed it by updating Azure Functions and Web Jobs Tools.

Note that as per the change list here, support for remote debugging of V2 functions was only enabled in 15.0.31201.0, and was granted a bug fix in 15.0.40108.0. https://github.com/Azure/Azure-Functions/blob/master/VS-AzureTools-ReleaseNotes.md

So, go into Tools and Extensions, see what version of the Azure Functions and Web Jobs Tools you have, and if it's older than 15.0.40108.0, upgrade it.




回答3:


got the same error with a brand new Function project in Visual Studio 2017. After getting the prompt from Visual Studio to upgrade Azure Function to v1.0.7 , I got rid of the error



来源:https://stackoverflow.com/questions/48135580/cannot-bind-parameter-log-to-type-tracewriter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!