Build Error - XAML Code Generation + Code Analysis RRS feed

  • Question

  • User37558 posted

    We have a .NET Standard library. It has code rules turned on. It has XAML files that generate code behinds. When we reference this library from our UWP app and try to run the UWP app, we get this error:

    Severity Code Description Project File Line Suppression State Error CA0001 CA0001 : An error was encountered while parsing IL for method: 'Adapt.Presentation.XamarinForms.SystemSetup.PagePanelSavePageContent.InitializeComponent', instruction at offset '0x387' with opcode 'Callvirt'. Active

    I have logged this as a bug here: https://bugzilla.xamarin.com/show_bug.cgi?id=57609

    Please either offer up your workarounds, or show the bug some love if you love code rulz.

    Monday, June 19, 2017 11:16 PM

All replies

  • User66163 posted

    Hi @MelbourneDeveloper

    Not sure if this is applicable, but I recently had something similar. Please check your UWP project's Build properties and ensure Use Native Tool chain is unchecked.

    Hope this helps,


    Tuesday, June 20, 2017 1:06 AM
  • User37558 posted

    Thanks. I will check this, but I have found that this does occur with Android as well. It's an error that comes up in our standard library which is shared - not the highest level UWP library.

    Tuesday, June 20, 2017 3:03 AM
  • User66163 posted

    Its unlikely to be the same issue since only UWP was affected in my solution. Sorry I was unable to help.


    Tuesday, June 20, 2017 12:02 PM
  • User37558 posted

    No problem. Thanks anyway.

    I don't know why code analysis is considered to be such a low priority at Microsoft. I've logged bugs with it before and they are literally ignored.

    This is an extremely frustrating situation. I literally have to Hit F-5, then hit Ctrl Break as soon as the error comes up, and then hit F-5 again to run the app on any platform.

    Tuesday, June 20, 2017 11:19 PM
  • User37558 posted

    I've now turned off code analysis on my main .NET Standard Xamarin Forms project so I can build. This is silly. The Visual Studio code analyzer should have the bugs ironed out by now. It's been a part of Visual Studio for years now.

    Wednesday, June 21, 2017 11:34 PM