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
InvokeDotNetfunctionality as part of your HTML/JS assets. -
_framework/hybridwebview.jsis 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.