Error in xaml saying that the type was not found

1

In my xaml I have:

<?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:Opa"   
             xmlns:maps="clr-namespace:Xamarin.Forms.Maps;assembly=Xamarin.Forms.Maps"  
             x:Class="Opa.MainPage">

    <maps:Map MapType="Street" />
...

</ContentPage>
  

The type 'maps: Map' could not be found. Make sure there is no   assembly reference missing, and if all referenced assemblies   were created.

But note that it is declared in the ContentPage header, in this line:

xmlns:maps="clr-namespace:Xamarin.Forms.Maps;assembly=Xamarin.Forms.Maps"

Why the error?

Edit1

My project is called Ola

So is my header

<?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:Ola"   
             xmlns:maps="clr-namespace:Xamarin.Forms.Maps;assembly=Xamarin.Forms"  
             x:Class="Ola.MainPage">

    <maps:Map MapType="Street" />
    
asked by anonymous 18.12.2018 / 20:06

1 answer

1

You are reversing things, assembly ddl name and usually has the same name as your project, if that is in question is only called Xamarin assembly is only Xamarin and not Xamarin.Forms.Maps which would be the path with the class namespace representing the maps control. But your project name should probably be Xamarin.Forms

 xmlns:maps="clr-namespace:Xamarin.Forms.Maps;assembly=Xamarin.Forms"  
    
19.12.2018 / 13:35