Resource dictionary type not found in namespace xmlns when debugging using iPhone

Hi All,
My solution consist of 3 project:
1. My backend project with assembly My_Test_App (portable)
2. My_Test_App.Android
3. My_Test_App.iOS

In the backend project, I have this XAML page code (Please forgive the name) :smiley:
<ContentPage x:Class="My_Test_App.Pages.LoginPage" xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:converters="clr-namespace:My_Test_App.Converters;assembly=My_Test_App" xmlns:effects="clr-namespace:My_Test_App.Effects;assembly=My_Test_App" xmlns:viewModels="clr-namespace:My_Test_App.ViewModels;assembly=My_Test_App" xmlns:views="clr-namespace:My_Test_App.Views;assembly=My_Test_App"> <ContentPage.Resources> <ResourceDictionary> <converters:Converter1 x:Key="conv1" /> <converters:Converter2 x:Key="conv2" /> <converters:Converter3 x:Key="conv3" /> </ResourceDictionary> </ContentPage.Resources> </ContentPage>

It works on android and iPhone simulator, but when i tested it on the real iPhone, i get this error:
Xamarin.Forms.Xaml.XamlParseException: Position 13:14. Type converters:Converter1 not found in xmlns clr-namespace:My_Test_App.Converters;assembly=My_Test_App

My code for Converter1 in the backend project:

namespace My_Test_App.Converters { public class Converter1: IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { bool original = (bool)value; return !original; } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } public My_Test_App() { } } }

Could you help with this please? I have a few suspect here:
1. Underscore on assembly name, but i need to keep the current assembly name..
2. In the IOS project properties, i changed the linker Options in iOS Build section from "Link SDK only" to "Link all assemblies". But, if i don't change it, i got error "Could not AOT the assembly......."
3. Possible bug in the current xamarin version (mine is 4.2.2.11)

Thank you for helping me!

Best Answer

Answers

  • PraiseGodPraiseGod CNMember

    I have the same problem. Can you elaborate on how to resolve this error please ? thanks.

Sign In or Register to comment.