Joyce de Lanna
Joyce de Lanna

Reputation: 1543

error in the xaml.g.cs in xamarin.forms

The type or name space does not exist...this error happens in the xaml.g.cs that is here:

[global::Xamarin.Forms.Xaml.XamlFilePathAttribute("C:\\montana\\neoFly_Montana1\\neoFly_Montana\\neoFly_Montana\\PopUp\\LoginPopup.xaml")]
public partial class LoginPopup : global::Rg.Plugins.Popup.Pages.PopupPage {

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Forms.Build.Tasks.XamlG", "0.0.0.0")]
    private global::Xamarin.Forms.Image login_img_forms;

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Forms.Build.Tasks.XamlG", "0.0.0.0")]
    private global::Xamarin.Forms.StackLayout login_stack_forms;

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Forms.Build.Tasks.XamlG", "0.0.0.0")]
    private global::Xamarin.Forms.MyEntry login_entry_login;

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Forms.Build.Tasks.XamlG", "0.0.0.0")]
    private global::Xamarin.Forms.MyEntry login_entry_pass;

it happend after I changed the xaml file:

<?xml version="1.0" encoding="utf-8" ?>
<pages:PopupPage xmlns="http://xamarin.com/schemas/2014/forms"
         xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
         xmlns:local="clr-namespace:neoFly_Montana.LayoutScripts"
         xmlns:pages="clr-namespace:Rg.Plugins.Popup.Pages;assembly=Rg.Plugins.Popup"
         xmlns:animations="clr-namespace:Rg.Plugins.Popup.Animations;assembly=Rg.Plugins.Popup"
         x:Class="neoFly_Montana.PopUp.LoginPopup"
         CloseWhenBackgroundIsClicked="False">

              <MyEntry Placeholder="E-mail:" Margin="10,0,0,0" x:Name="login_entry_login" FontSize="Medium" TextColor="{StaticResource MarromClaro}" PlaceholderColor="{StaticResource MarromClaro}"/>

I added the MyEntry and the xmlns:local="clr-namespace:neoFly_Montana.LayoutScripts" I tried to clean and rebuild solution

Upvotes: 0

Views: 1003

Answers (1)

Jason
Jason

Reputation: 89102

The compiler needs to know what MyEntry is - there are two steps to this. The first is to define the namespace, which you've already done. The second is to specify that MyEntry exists in the local namespace:

you need to use <local:MyEntry ...

Upvotes: 1

Related Questions