Where can I find the new HybridWebView.js

Arthur P 90 Reputation points
2025-11-25T18:45:59.4966667+00:00

Hello,

I upgraded my .NET MAUI project from 9 to 10 and now my InvokeDotNet-Method from the HybridWebView.js doesnt work and I found online that the file gets updated, but I cant find the new file in the sample project (https://github.com/dotnet/maui-samples/tree/main/10.0/UserInterface/Views/HybridWebViewDemo). Where can I find it or hasn't it changed?

Thanks

Developer technologies | .NET | .NET MAUI
{count} vote

Answer accepted by question author
  1. Jack Dang (WICLOUD CORPORATION) 10,490 Reputation points Microsoft External Staff Moderator
    2025-11-26T06:06:42.5166667+00:00

    Hi @Arthur P ,

    Thanks for reaching out.

    If you had a working InvokeDotNet method in your MAUI 9 project, it likely came from a JS helper file that you (or the sample you were following) included manually. In MAUI 10, the sample project (HybridWebView Sample) does not provide a “new” or updated JS file, because the framework expects developers to supply their own JS files as part of the app’s web assets.

    In practice, when you include your web content in MAUI 10, you typically reference a JS file like this:

    <script src="_framework/hybridwebview.js"></script>
    

    This _framework/hybridwebview.js is generated when your web content is served via MAUI and handles JS-to-.NET calls. So the InvokeDotNet method isn’t something that exists in a prebuilt, framework-supplied JS file - it’s part of your app’s web content and controlled via the JS script you include.

    Summary:

    • The framework does not ship a built-in HybridWebView.js.
    • You need to include any JS helper scripts that provide InvokeDotNet functionality as part of your HTML/JS assets.
    • _framework/hybridwebview.js is the MAUI-generated JS bridge when serving web content, and that is what you should reference in your HTML.

    Hope this helps! If my answer was helpful - kindly follow the instructions here so others with the same problem can benefit as well.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.