title: Regressed Issue: XamlCompilation error Value cannot be null, Parameter name: method
body: <p>I searched SO to find <a href="https://stackoverflow.com/questions/40441858/xamarin-form-xamlcompilation-error-value-cannot-be-null-parameter-name-method">this</a> issue, but the answer didn't work for me so the issue still exists.</p>
  
  <p>Personally, I believe the issue is probably related to some configuration "thing", but I would have no idea where to start looking to resolve it. To my knowledge, I have not altered any config settings out of norm (just used standard new project approach). Here is some detail on my issue:</p>
  
  <p>Just so happens that today is first time trying out the XamlC feature. At first I tried the assembly level attribute in my App.cs file:</p>
  
  <pre class="lang-cs prettyprint-override"><code>[assembly: XamlCompilation(XamlCompilationOptions.Compile)]
  </code></pre>
  
  <p>After compiling, I was getting a bunch of errors that were all identical. I also got a a different error on any page using a TemplateControl. So I pulled it off the assembly level and put a single class-level attribute on one page, and it still failed with the same error:</p>
  
  <pre><code>Value cannot be null.
  Parameter name: method
  </code></pre>
  
  <p>I poked around on Stackoverflow and found that about a year ago someone had the same issue (here), but they said they resolved it by upgrading Xam Forms to latest version. Since I'm on the latest stable versions, I have no where to go there.</p>
  
  <p>I tried this class-level attribute on several pages in my app and only found it to work on a single page in my entire app... just so happens this page has zero bindings in the XAML markup. I'm wondering if a bug was introduced that causes it to blow up.</p>
  
  <p>Markup of page that doesn't work:</p>
  
  <pre><code>&lt;ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
               xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
               x:Class="Prepify.App.Pages.MainMenu"
                           xmlns:controls="clr-namespace:ImageCircle.Forms.Plugin.Abstractions;assembly=ImageCircle.Forms.Plugin.Abstractions"
                           BackgroundColor="White"
               Title="Menu"&gt;
      &lt;StackLayout VerticalOptions="FillAndExpand"&gt;
          &lt;ListView
              Header="{Binding .}"
              SeparatorColor="{StaticResource dividerColor}"
              HasUnevenRows="True"
              ItemSelected="AppMenu_OnItemSelected"
              ItemTapped="AppMenu_OnItemTapped"
              ItemsSource="{Binding Items}"
              x:Name="appMenu"&gt;
  
              &lt;ListView.HeaderTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;Grid&gt;
                          &lt;Grid.ColumnDefinitions&gt;
                              &lt;ColumnDefinition Width="10"/&gt;
                              &lt;ColumnDefinition Width="*"/&gt;
                              &lt;ColumnDefinition Width="30"/&gt;
                              &lt;ColumnDefinition Width="10"/&gt;
                          &lt;/Grid.ColumnDefinitions&gt;
                          &lt;Grid.RowDefinitions&gt;
                              &lt;RowDefinition Height="30"/&gt;
                              &lt;RowDefinition Height="80"/&gt;
                              &lt;RowDefinition Height="Auto"/&gt;
                              &lt;RowDefinition Height="5"/&gt;
                          &lt;/Grid.RowDefinitions&gt;
  
                          &lt;BoxView Grid.ColumnSpan="4" Grid.RowSpan="4" BackgroundColor="{StaticResource grayDark}"/&gt;
                          &lt;controls:CircleImage Grid.Column="1" Grid.Row="1" HorizontalOptions="Start" VerticalOptions="End" Source="{Binding ProfileImageUrl}" WidthRequest="75" HeightRequest="75"/&gt;
                          &lt;Label Grid.Column="1" Grid.Row="2" Text="{Binding FullName}"/&gt;
                          &lt;ActivityIndicator Grid.Column="2" Grid.Row="2" IsVisible="{Binding IsBusy}" IsRunning="{Binding IsBusy}" Color="White" WidthRequest="20" HeightRequest="20" VerticalOptions="Center" /&gt;
  
                      &lt;/Grid&gt;
                  &lt;/DataTemplate&gt;
              &lt;/ListView.HeaderTemplate&gt;
              &lt;ListView.ItemTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;ViewCell&gt;
                          &lt;StackLayout Orientation="Horizontal" &gt;
                              &lt;StackLayout.Padding&gt;
                                  &lt;OnPlatform x:TypeArguments="Thickness" Android="15,15,15,15" iOS="25,12,15,12" /&gt;
                              &lt;/StackLayout.Padding&gt;
                              &lt;Image Source="{Binding Icon}" VerticalOptions="Center" WidthRequest="20" HeightRequest="20"/&gt;
                              &lt;Image WidthRequest="20"/&gt;
                              &lt;Label Text="{Binding Label}" VerticalOptions="Center" TextColor="{Binding LabelColor}" Style="{DynamicResource ListItemTextStyle}"/&gt;
                          &lt;/StackLayout&gt;
                      &lt;/ViewCell&gt;
                  &lt;/DataTemplate&gt;
              &lt;/ListView.ItemTemplate&gt;
          &lt;/ListView&gt;
      &lt;/StackLayout&gt;
  &lt;/ContentPage&gt;
  </code></pre>
  
  <p>Markup of only page that does work (note, no bindings anywhere):</p>
  
  <pre><code>&lt;MasterDetailPage xmlns="http://xamarin.com/schemas/2014/forms"
      xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
      x:Class="Prepify.App.Pages.Root"
      xmlns:pages="clr-namespace:Prepify.App.Pages;assembly=Prepify.App"
      MasterBehavior="Popover"
      Title="Make Preparedness Easy"&gt;
  
      &lt;MasterDetailPage.Master&gt;
          &lt;pages:MainMenu/&gt;
      &lt;/MasterDetailPage.Master&gt;
  
  &lt;/MasterDetailPage&gt;
  </code></pre>
  
  <p>I'm using all the latest as of posting this question.
  Visual Studio 2015
  Xamarin.Forms 2.3.3.193
  Xamarin.VS 4.3.0.784</p>