locked
Custom controls not found in Debug Mode RRS feed

  • Question

  • User241340 posted

    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: xmlns:controls="clr-namespace:MyApp.UserControls;assembly=MyApp" 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?

    Friday, September 16, 2016 1:12 PM

All replies

  • User327779 posted

    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 https://bugzilla.xamarin.com/show_bug.cgi?id=42815

    Tuesday, June 20, 2017 9:46 AM
  • User228975 posted

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

    Tuesday, June 20, 2017 9:48 AM
  • User327779 posted

    @AlbertK 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

    cf. https://stackoverflow.com/questions/30329377/xamarin-forms-xaml-xamlparseexception-markupextension-not-found-for-transtrans

    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 :)

    Tuesday, June 20, 2017 10:01 AM
  • User228975 posted

    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.

    Tuesday, June 20, 2017 10:05 AM
  • User115860 posted

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

    Monday, September 3, 2018 10:23 AM