Skip to content

Dynamic.InvokeMember on a Async method which returns a generic ValueTask throws Exception #33

@StefH

Description

@StefH

This original code:

public async ValueTask<VideoWatchPageExtractor> GetVideoWatchPageAsync(
            VideoId videoId,
            CancellationToken cancellationToken = default)
{
 // ....
}

Is called via:

var result = await Dynamic.InvokeMember(_controller, "GetVideoWatchPageAsync", videoId, CancellationToken.None);

And this throws Exception like:

''System.ValueType' does not contain a definition for 'GetAwaiter''

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions