Skip to content
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

Errors after upgrading to 1.0.19 #232

Open
igorgnedish opened this issue Aug 31, 2018 · 4 comments
Open

Errors after upgrading to 1.0.19 #232

igorgnedish opened this issue Aug 31, 2018 · 4 comments
Labels

Comments

@igorgnedish
Copy link

Hi All,

after functions SDK has been updated to 1.0.19 (with corresponding packages like Microsoft.Azure.WebJobs and Microsoft.Azure.WebJobs.Extensions to 3.0.0-beta8 as mentioned here: Azure/app-service-announcements#129).

in the project I have had a custom binding implemented, I was using this approach: https://github.com/Azure/azure-webjobs-sdk/wiki/Creating-custom-input-and-output-bindings

Noticed two things that does not work anymore:

in IExtensionConfigProvider implementation ExtensionConfigContext does not contain Config property anymore. So it's not clear how can I resolve IExtensionRegistry in order to registed 'global' filter
in IExtensionConfigProvider implementation I registered BindingRule and Binded in to input
Note that ExtensionConfigProvider is located in different assembly (not in the functions' one). Also this code was working before SDK update occured.

So, after I run the project I can see a bunch of a following errors:
Error indexing method 'FunctionClass.MethodName'
[8/31/2018 7:40:28 AM] Microsoft.Azure.WebJobs.Host: Error indexing method 'FunctionClass.MethodName'. Microsoft.Azure.WebJobs.Host: Cannot bind parameter 'bindableParameterName' to type ParameterType. 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.).

@czitelli
Copy link

czitelli commented Aug 31, 2018

Hi, I have the same error injection my custom ExtensionProvider on Functions V2 SDK 1.0.19. (Before this update It's been working well)
The exceptions message is:
FunctionClass.MethodName'. Microsoft.Azure.WebJobs.Host: Cannot bind parameter 'bindableParameterName' to type ParameterType. Make sure the parameter Type is supported by the binding.

@ielcoro
Copy link

ielcoro commented Sep 3, 2018

About IExtensionConfigProvider, I posted how it's done now with te 1.0.19 changes here.

@igorgnedish
Copy link
Author

also here's a dup of the this. maybe will find some useful info there:
Azure/azure-functions-core-tools#684

@czitelli
Copy link

czitelli commented Sep 7, 2018

I've the solution, @ielcoro has the thruth, you need an Startup Class like this

using My.Functions;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Hosting;
using Microsoft.Extensions.DependencyInjection;

[assembly: WebJobsStartup(typeof(WebJobsExtensionStartup ))]
namespace My.Functions
{
    public class WebJobsExtensionStartup : IWebJobsStartup
    {
        public void Configure(IWebJobsBuilder builder)
        {
            builder.AddExtension<InjectionConfiguration>();
            // InjectionConfiguration must be implement IExtensionConfigProvider like the old version
        }
    } 
}

With this class, you are configuring your custom injection.
Note that the startup class (WebJobsExtensionStartup) is the same reference for assembly attribute
Good luck!!

@vijayrkn vijayrkn added this to the Triaged milestone Feb 4, 2019
@fabiocav fabiocav removed this from the Triaged milestone Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants