azure-webjobs-sdk icon indicating copy to clipboard operation
azure-webjobs-sdk copied to clipboard

The 'Function1' function is in error: The binding name _ is invalid. Please assign a valid name to the binding.

Open anton-gustafsson opened this issue 2 years ago • 1 comments

Please provide a succinct description of the issue.

Repro steps

Provide the steps required to reproduce the problem

  1. Create a new timer triggered function project (.net 6)

  2. Rename TimerInfo parameter to underscore (_)

Expected behavior

I expect this to work. I could not find any naming rules for timerInfo parameter name, so it would be nice to know why this is a limitation.

Actual behavior

Runtime error: The 'Function1' function is in error: The binding name _ is invalid. Please assign a valid name to the binding.

Related information

Provide any related information

  • PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.13"

image

anton-gustafsson avatar May 17 '22 05:05 anton-gustafsson

Hi @anton-gustafsson We are discussing this internally and let you know about the findings soon!

Ved2806 avatar Sep 28 '22 10:09 Ved2806

Hi @anton-gustafsson It is recommended that parameter name should be something meaningful. It is allowed that name can start with underscore. It is not supporting the "underscore" as a parameter name. You may want to go through ValidateBinding

Ved2806 avatar Nov 03 '22 04:11 Ved2806