Skip to content

DotNet.invokeMethodAsync faild when invoke Task<T> method on c# code #15764

@danielmeza

Description

@danielmeza

When I try to call a async generic method from JavaScript I get this error: The assembly '{assemblyName}' does not contain a public method with [{nameof(JSInvokableAttribute)}("{methodIdentifier}")].
[JSInvokable] public static Task<string> GetAccessToken(string connectionId)
its related to ScanAssemblyForCallableMethods in https://github.com/aspnet/Blazor/blob/master/src/Microsoft.JSInterop/DotNetDispatcher.cs

It's a missing feature on this implementation?
And if it's, is someone working on implementing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-blazorIncludes: Blazor, Razor Components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions