locked
new error coming out of no where in app.xamal.g.cs plz help RRS feed

  • Question

  • User390299 posted

    System.MethodAccessException Message=Method Xamarin.Forms.Xaml.Diagnostics.VisualDiagnostics.RegisterSourceInfo(object,System.Uri,int,int)' is inaccessible from methodKula.App.InitializeComponent()'

    [assembly: global::Xamarin.Forms.Xaml.XamlResourceIdAttribute("Kula.App.xaml", "App.xaml", typeof(global::Kula.App))]
    
    namespace Kula {
    
    
    [global::Xamarin.Forms.Xaml.XamlFilePathAttribute("App.xaml")]
    public partial class App : global::Xamarin.Forms.Application {
    
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Forms.Build.Tasks.XamlG", "2.0.0.0")]
        private void InitializeComponent() {
            global::Xamarin.Forms.Xaml.Extensions.LoadFromXaml(this, typeof(App));
        }
    
      }
    

    }

    never even been in this file but it just started giving me an error only when trying to emulate i am able to build/rebuild no problem note i did just update xamarin.forms nuget packedge

    Wednesday, December 4, 2019 3:11 AM

Answers

  • User390299 posted

    @theConfusedOne said: System.MethodAccessException Message=Method Xamarin.Forms.Xaml.Diagnostics.VisualDiagnostics.RegisterSourceInfo(object,System.Uri,int,int)' is inaccessible from methodKula.App.InitializeComponent()'

    [assembly: global::Xamarin.Forms.Xaml.XamlResourceIdAttribute("Kula.App.xaml", "App.xaml", typeof(global::Kula.App))]
    
    namespace Kula {
    
    
    [global::Xamarin.Forms.Xaml.XamlFilePathAttribute("App.xaml")]
    public partial class App : global::Xamarin.Forms.Application {
    
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Forms.Build.Tasks.XamlG", "2.0.0.0")]
        private void InitializeComponent() {
            global::Xamarin.Forms.Xaml.Extensions.LoadFromXaml(this, typeof(App));
        }
    
      }
    

    }

    never even been in this file but it just started giving me an error only when trying to emulate i am able to build/rebuild no problem note i did just update xamarin.forms nuget packedge

    i downgraded the xamarin.forms packedge and it solved to problem. note to any xamarin employees there may be a bug but idk

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, December 4, 2019 3:29 AM

All replies

  • User390299 posted

    @theConfusedOne said: System.MethodAccessException Message=Method Xamarin.Forms.Xaml.Diagnostics.VisualDiagnostics.RegisterSourceInfo(object,System.Uri,int,int)' is inaccessible from methodKula.App.InitializeComponent()'

    [assembly: global::Xamarin.Forms.Xaml.XamlResourceIdAttribute("Kula.App.xaml", "App.xaml", typeof(global::Kula.App))]
    
    namespace Kula {
    
    
    [global::Xamarin.Forms.Xaml.XamlFilePathAttribute("App.xaml")]
    public partial class App : global::Xamarin.Forms.Application {
    
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Forms.Build.Tasks.XamlG", "2.0.0.0")]
        private void InitializeComponent() {
            global::Xamarin.Forms.Xaml.Extensions.LoadFromXaml(this, typeof(App));
        }
    
      }
    

    }

    never even been in this file but it just started giving me an error only when trying to emulate i am able to build/rebuild no problem note i did just update xamarin.forms nuget packedge

    i downgraded the xamarin.forms packedge and it solved to problem. note to any xamarin employees there may be a bug but idk

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, December 4, 2019 3:29 AM
  • User81221 posted

    I was experiencing the same error. Upgrading to Xamarin Forms Nuget Pacakages to 4.3.0.991221 solved the problem, but it introduced this problem:

    The error seems to occur at exactly the same spot in the program - when the splash screen is displayed. The app runs fine, but VS disconnects from the app falls out of run/debug mode. This leaves me unable to debug the app. Note, I am using the emulator, hosted on my Mac, but I am building and running from Windows.

    Friday, December 6, 2019 5:02 AM
  • User391095 posted

    Had a similar problem. Updating the Xamarin.Forms reference in both the Xamarin Forms project and Android/IOS projects solved it.

    Sunday, December 15, 2019 10:22 PM