Build Error - XAML Code Generation + Code Analysis

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.

Answers

  • HunumanHunuman GBMember ✭✭✭✭

    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,

    Tim

  • MelbourneDeveloperMelbourneDeveloper AUMember ✭✭✭

    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.

  • HunumanHunuman GBMember ✭✭✭✭
    edited June 2017

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

    Tim

  • MelbourneDeveloperMelbourneDeveloper AUMember ✭✭✭

    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.

  • MelbourneDeveloperMelbourneDeveloper AUMember ✭✭✭

    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.

Sign In or Register to comment.