Xamarin undeclared xmlns prefix/Type StaticResource not found in xmlns

Viewed 728

I really need help with the next xaml errors. They only show when building the solution, not before

Given then next partial code:

<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
         xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
         xmlns:skiarate="clr-namespace:SkiaRate;assembly=SkiaRate.Forms"
         xmlns:maps="clr-namespace:Xamarin.Forms.Maps;assembly=Xamarin.Forms.Maps"
         x:Class="Project.Views.ProductDetailPage"
         xmlns:i18n="clr-namespace:Project.Helpers"
         BindingContext="{Binding Main, Source={StaticResource Locator}}">

And asociated xaml.cs file

namespace Project.Views
{
    [XamlCompilation(XamlCompilationOptions.Compile)]
    public partial class ProductDetailPage : ContentPage
    {
        public ProductDetailPage ()
        {
            InitializeComponent ();
        }
    }
}

I get

Position 55:93. Undeclared xmlns prefix 'i18n'

Where line 55 is

<Label Grid.Row="0" Margin="5,10,0,0" Grid.Column="0" FontSize="18" Text="{i18n:Translate Telephone}"/>

I have used the exact same lines in other xaml pages, and it doesn't throw this error.

Things that I have tried:

-Delete line 55, error changes to

Position 10:14. Type StaticResource not found in xmlns

(I use binding with the main page on all my xaml pages, and only crashes in this one)

-Clean, build, rebuild, in all posible orders with the next 2 items

-Delete obj and bin contents

-Delete packages content (both from local project and local pc's user)

-Copy a page that does not have errors, modify it's header to the new page name, then error shows. (I tried this several times with several names)

-Create a content page from zero, create header manually, copy the ContentPage.Content from the previous page

-Change xaml's page properties (custom tool)

-Update Xamarin.Forms to last version pre-3.2.*. After doing this I changed to 3.1 again

What else can I try?

Note: All this started when I installed Rg.Plugins.Popup to convert this page to a popup page, then I deleted the changes on this page, and tried with deleting the libraries too.

0 Answers
Related