Forum Xamarin.Forms

Cannot create xmlns for Xamarin.Forms project namespace

LukeTimLukeTim Member ✭✭

I'm encountering the following compilation error whenever I try to create a XAML namespace for my current project

Error: Failed to resolve assembly: 'TodoQ.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'

I have been using a custom control from an external project throughout the project and the compiler has never complained about it. Here is the XAML:

<ContentPage xmlns:util="clr-namespace:TodoQ.Utilities" xmlns:custom="clr-namespace:TodoQ.Controls" xmlns:swipecards="clr-namespace:SwipeCards.Controls;assembly=SwipeCards.Controls" ... x:Class="TodoQ.Views.ItemsPage" Title="{Binding Title}" x:Name="BrowseItemsPage">

As you can see, I have two namespaces which refer to my current Xamarin.Forms project. Neither of which works if I try to use them. On the other hand, the SwipeCards.Controls namespace works perfectly.

Does anybody know what it is I am doing wrong? I'm practically tearing my hair out here. Things are so much simpler with the WPF version of XAML, it all just seems to work there.

Answers

  • JoeMankeJoeManke USMember ✭✭✭✭✭

    You probably need to specify the assembly name for the TodoQ namespaces like you're doing for the SwipeCards namespace.

  • LukeTimLukeTim Member ✭✭

    @JoeManke said:
    You probably need to specify the assembly name for the TodoQ namespaces like you're doing for the SwipeCards namespace.

    I tried that, makes no difference. And it's my Xamarin.Forms assembly so I understood that an assembly reference wasn't necessary?

Sign In or Register to comment.