Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Cannot bind POCO to return value of function #869
Binding the return value of a function to an output causes the error:
Microsoft.Azure.WebJobs.Host: Error indexing method 'Functions.ReturnOutputTest'. Microsoft.Azure.WebJobs.Host: Can't bind Blob to type 'Submission#0+Poco&'.
Create a function with an output bound to a blob. I triggered my function using a manual trigger. Here's the code:
Binding works and outputs value to blob
The binding fails.
Compiling the function gives the error:
You see this error when switching to the Develop tab in the portal:
Ok, I dug into this. It turns out that this isn't supported by default in the core WebJobs SDK, which is why it doesn't work in functions. I logged a core SDK bug here to track this. Once we add that to core SDK, it will unblock this scenario for Functions.
I'll leave this issue open to track this - once the core SDK supports this, we'll add a test for it.
As a workaround, you can use a non POCO type, etc. a string.