Bug 57609 - Build Error - XAML Code Generation + Code Analysis
Summary: Build Error - XAML Code Generation + Code Analysis
Status: RESOLVED DUPLICATE of bug 44130
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: unspecified
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Stephane Delcroix
Depends on:
Reported: 2017-06-19 23:15 UTC by Melbourne Developer
Modified: 2017-06-27 09:32 UTC (History)
2 users (show)

Tags: xamlc
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Melbourne Developer 2017-06-19 23:15:54 UTC
When I turn on code analysis (code rules), I get a compilation error most of the time when I try to my Xamarin apps. The error occurs in a class library which has XAML pages where code generation occurs. Generally, this error comes up once, so I can cancel the build, and try to compile again, and the problem goes away.

You can recreate the problem by creating a .NET Standard library that references Xamarin Forms, put a XAML page or two in the .NET Standard library, turn on some code rules, and reference this library from a platform specific project like UWP (This usually happens with UWP). 

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

This is a very frustrating error and slows down builds.
Comment 1 David Ortinau [MSFT] 2017-06-26 15:29:06 UTC
Assigning to Stephane for investigation.


What version of Visual Studio are you on? 

What version of Xamarin.Forms?

Happening on all projects/solutions? If specific to a project, please provide a sample.

Comment 2 Stephane Delcroix 2017-06-27 09:32:32 UTC
dupe of https://bugzilla.xamarin.com/show_bug.cgi?id=44130

*** This bug has been marked as a duplicate of bug 44130 ***