Skip to content

[ActivityTrigger] parameter named "data" causes error on local startup  #1281

Description

@dlyall-maine

Here's the method:

    [FunctionName(nameof(DoActivity))]
    public static async Task<string> DoActivity([ActivityTrigger]string data, ILogger log)
    {
        log.LogInformation($"hashing {data}");

        return data.GetHashCode().ToString();
    }

Here's the error that appears in the console window:

[7/20/2019 6:01:27 PM] Microsoft.Azure.WebJobs.Host: Error indexing method 'DoActivity'. Microsoft.Azure.WebJobs.Host: Can't bind parameter 'data' to type 'System.String'.
[7/20/2019 6:01:27 PM] Error indexing method 'DoActivity'
[7/20/2019 6:01:27 PM] Microsoft.Azure.WebJobs.Host: Error indexing method 'DoActivity'. Microsoft.Azure.WebJobs.Host: Can't bind parameter 'data' to type 'System.String'.

When parameter "data" is renamed to, say, "info" the error goes away.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions