Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Custom controls not found in Debug Mode

I am using Xamarin on Visual Studio. I have a bunch of custom controls in the PCL. These controls are referenced in my XAML with:
when I run the app in Release Mode (on emulator or on device, it doesn't make difference) they are correctly loaded (and, of course, displayed). When I run the app in Debug Mode I receive this error message:
Type controls:HomeHeader not found in xmlns clr-namespace:MyApp.UserControls;assembly=MyApp
Until yesterday, this worked fine in Debug and Release mode, yesterday Xamarin.Android was updated to 7.0.0 version
How can I solve this issue?


  • TomDenooTomDenoo USMember

    I'm having the same error but it works in debug mode, not in release mode.
    IOS and UWP have no problems, but releasing for android throws the same exception.

    If I initiate the controls in the MainActivity.cs the exeption does not occur, but the app does not work as it should

    The android logcat also states a warning
    "PackageManager android.content.res.Resources$NotFoundException: String resource ID #0x7f050000"
    Could this be related to

  • AlbertKAlbertK MYMember ✭✭✭✭

    Try VS 2015 Menu -> Build -> Clean Solution (build and deploy again)

  • TomDenooTomDenoo USMember

    Thanks for your respons...

    Turns out i had ANdroid Options - Linking set to "SDK and user assemblies"
    changing it to "SDK assemblies only" did the trick


    This one was driving me mad for hours. I'm new to the forum... minutes after posting i found the solution. Good karma over here :)

  • AlbertKAlbertK MYMember ✭✭✭✭

    But now you APK is going to be large :(. if you can track the the assembly that is missing during runtime then you can use the skip linking assemblies to include that then Linking set to "SDK and user assemblies"

    Hope this helps.

  • NicolaLoroNicolaLoro USMember ✭✭

    Got the same error after having updated some NuGet components. Solved by cleaning the solution.

Sign In or Register to comment.