Skip to content

InvalidOperationException: No JavaScript runtime found. #116

@toseni

Description

@toseni

While everything works fine locally using both Debug and Release configuration, after using published app error InvalidOperationException: No JavaScript runtime found. appeares.

I am using .NET 6 and Typeahead component.

I suspect this is caused by .NET 6 trimming. Default settings are that "removes unused members from types". Since GetJSRuntime uses reflection to get JSRuntime trimmer can not see that JSRuntime property is used and removed it.

Disabled trimming solved this issue for me, but is not suitable as long term solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions