The type or namespace name`XamlFilePathAttribute'does not exist in the namespace`Xamarin.Forms.Xaml

this error seems to pop up at random when coding. where all my xaml.g.cs show this

        // ------------------------------------------------------------------------------
        //  <autogenerated>
        //      This code was generated by a tool.
        //      Mono Runtime Version: 4.0.30319.42000
        // 
        //      Changes to this file may cause incorrect behavior and will be lost if 
        //      the code is regenerated.
        //  </autogenerated>
        // ------------------------------------------------------------------------------

        namespace PassPortTrial3 {


            [global::Xamarin.Forms.Xaml.XamlFilePathAttribute("/Users/Darnelle/Desktop/Passport/PassportAppMain/PassPortTrial3/App.xaml")]
            public partial class App : global::Xamarin.Forms.Application {

                [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Forms.Build.Tasks.XamlG", "0.0.0.0")]
                private void InitializeComponent() {
                    global::Xamarin.Forms.Xaml.Extensions.LoadFromXaml(this, typeof(App));
                }
            }
        }

where the XamlFilePathAttribute is underlined red
i use git to when i switch back to master everything is fine

this happens alot recently but this time i was removing a line of xaml code and it broke again that time for sure i knew it wasnt me doing anything

anybody here experiencing this weird bug?

Best Answer

Answers

  • thtcaribbeanguythtcaribbeanguy USMember ✭✭
    Accepted Answer

    using xamarin.forms pre release solved it

  • nogardnogard MXMember

    With VStudio you need click in Solution Clean after CLick in Compile Solution

    its ok for me

  • MarketAllyMarketAlly USMember ✭✭

    I get so tired of this error - it always appears after an upgrade which they release often. Then I fight this nightmare in addition to the famous forms designer error for the core.

  • PeterFarrerPeterFarrer USMember ✭✭

    @MarketAlly said:
    I get so tired of this error - it always appears after an upgrade which they release often. Then I fight this nightmare in addition to the famous forms designer error for the core.

    My issue was that the PCL was not updated but the native was. My mistake.

  • JAYRAMANUJJAYRAMANUJ USMember

    hi, @thtcaribbeanguy
    where to update "using xamarin.forms"?

  • thtcaribbeanguythtcaribbeanguy USMember ✭✭

    @JAYRAMANUJ said:
    hi, @thtcaribbeanguy
    where to update "using xamarin.forms"?

    the packages folder! right click it , add new nuget , search for xamarin.forms ( ensure show pre-release package is selected) then update

  • JAYRAMANUJJAYRAMANUJ USMember

    Thanks @thtcaribbeanguy !!

Sign In or Register to comment.