Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Assembly for xmlns:locate not found (Forms-Project with XAML)

$
0
0

Hi,

in my Shared-Forms-Project "BorrowedBooks" this "MainPage" made in XAML should dislpay a list of books. The list is a static member in App.cs

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
                       xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                        xmlns:local="clr-namespace:BorrowedBooks;assembly=BorrowedBooks"
                       x:Class="BorrowedBooks.Views.MainPage"
                       Title="Borrowed Books">
    <ListView x:Name="listView" IsVisible="true" ItemsSource="{x:Static local:App.BorrowedBooks}">
        <ListView.ItemTemplate>
            <DataTemplate>
                <ViewCell>
                    <ViewCell.View>
                        <StackLayout Orientation="Vertical" HorizontalOptions="CenterAndExpand">
                            <Label Text="{Binding Name}" HorizontalOptions="Center" />
                            <Label Text="{Binding Author}" Font="10" HorizontalOptions="Center"/>
                        </StackLayout>
                    </ViewCell.View>
                </ViewCell>
            </DataTemplate>
        </ListView.ItemTemplate>
    </ListView>
</ContentPage>

The problematic point is following line:

xmlns:local="clr-namespace:BorrowedBooks;assembly=BorrowedBooks"

If I debug the App on any platform (WinPhone, Android), an IOExpection occurs and tells me that the assembly "BorrowedBooks" was not found.

If I run it on Anroid and change the code like this, then it works perfetly:

xmlns:local="clr-namespace:BorrowedBooks;assembly=BorrowedBooks.Android"

The same works analog with "WinPhone", but I think this should work without the platform specific name?

I'm using Visual Studio 2013 Update 3 and the current Xamarin version.


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>