.net – System.NotSupportedException: ‘Unable to find Invoker for type ‘Microsoft.Maui.MauiApplication’. Was it linked away?’ MAUI


After updating .NET MAUI project from .NET 8 to .NET 9, when I try to build and deploy Android app in Emulator, build process shows “Deployed” and then as soon as splash screen appear’s I get this error

System.NotSupportedException: 'Unable to find Invoker for type 'Microsoft.Maui.MauiApplication'. Was it linked away?'

Here is the error image

enter image description here

This is what I have tried until now, but no luck

  1. Clean project and then re-build
  2. Delete obj/bin project and then re-build
  3. Updated Nuget packages.
  4. Checked that I have properly installed .NET 9 SDK, Android Emulator with api 35
  5. Updated AndroidManifest.xml
    <uses-sdk android:minSdkVersion="35" android:targetSdkVersion="35" />

How to resolve this?

Leave a Reply

Your email address will not be published. Required fields are marked *