-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot bind parameter '$return' to type IActionResult #3061
Comments
Thanks for reporting please share the all repro steps |
Just setting up a ServiceBusTriggered or TimerTrigger Function like below and the exception will be thrown at startup:
Our
The "problem" is that our Function project is not using a regular Program.cs
We don't have a Program.cs in our solution, just a Startup with a bunch Configure. Maybe I would need to re-create the Function solution, but for now that's not an option. So, that's why I'm trying to figure out this without having to create a new solution and start from scratch. Thanks! |
Hi! When executing ServiceBusTrigger or TimeTrigger Functions, I got this exception:
The 'CrmOrderSubscriptionFunction' function is in error: Microsoft.Azure.WebJobs.Host: Error indexing method 'CrmOrderSubscriptionFunction'. Microsoft.Azure.WebJobs.Host: Cannot bind parameter '$return' to type IActionResult&. Make sure the parameter Type is supported by the binding. If you're using binding extensions (e.g. Azure Storage, ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. builder.AddAzureStorage(), builder.AddServiceBus(), builder.AddTimers(), etc.).
Before, all the Functions were returning a Task and they were working just fine. But, many of these Functions call to some external apis and we would like to get these calls responses and make the Functions return them. Otherwise, the Functions are always returning a 200 (or at maximum a 500 if it is something out of our control).
We have 1 HttpTrigger function that is not throwing this exception. Only the ServiceBus and TimeTrigger ones.
We are using .NET 6. Don't know if the host.json is necessary, but currently in VS is like this:
The text was updated successfully, but these errors were encountered: