title: Xamarin.Forms - XamlCompilation MissingMethodException
body: <p>I want to improve performance of my Xamarin.Forms UWP application because it is extremely slow in Release mode (".NET native" checked). So I apply XAMLC at the assembly level in the PCL project:</p>
  
  <pre><code>[assembly: XamlCompilation (XamlCompilationOptions.Compile)]
  namespace MyApp
  {
  }
  </code></pre>
  
  <p>but with this attribute I receive runtime error:</p>
  
  <blockquote>
    <p>"Method not found: 'Void
    Xamarin.Forms.Xaml.Internals.SimpleValueTargetProvider..ctor(System.Object[])'."</p>
  </blockquote>
  
  <p>According to this:</p>
  
  <p><a href="https://github.com/xamarin/Xamarin.Forms/blob/master/docs/Xamarin.Forms.Xaml/Xamarin.Forms.Xaml.Internals/SimpleValueTargetProvider.xml" rel="noreferrer">https://github.com/xamarin/Xamarin.Forms/blob/master/docs/Xamarin.Forms.Xaml/Xamarin.Forms.Xaml.Internals/SimpleValueTargetProvider.xml</a></p>
  
  <p>the SimpleValueTargetProvider class has 2 versions:</p>
  
  <ul>
  <li>1.5.0.0 - constructor with one parameter System.Object[]</li>
  <li>2.0.0.0 - constructor with 2 parameters System.Object[] and System.Object</li>
  </ul>
  
  <p>I use Xamarin.Forms 2.3.3.163-pre3 so I use the second version in my project (when I navigate to SimpleValueTargetProvider in Xamarin.Forms.Xaml.Internals I can see constructor with 2 parameters). My understanding is that apparently "something" is still calling SimpleValueTargetProvider 1.5.0.0, but I have no idea what it is.</p>
  
  <p>I removed all of the third-party components but it did not help. I used fusion log to find out what is going on but this is all I get (to be honest I don't know if this is related to the issue I'm facing at all):</p>
  
  <pre><code>&gt; *** Assembly Binder Log Entry  (10/26/2016 @ 9:09:42 PM) ***
  &gt; 
  &gt; The operation failed. Bind result: hr = 0x80070002. The system cannot
  &gt; find the file specified.
  &gt; 
  &gt; Assembly manager loaded from: 
  &gt; C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll Running under
  &gt; executable  C:\Program Files (x86)\Microsoft Visual
  &gt; Studio\VS15Preview\Common7\IDE\devenv.exe
  &gt; --- A detailed error log follows. 
  &gt; 
  &gt; === Pre-bind state information === LOG: DisplayName = XamlDesignerFaultInjection  (Partial) WRN: Partial binding information
  &gt; was supplied for an assembly: WRN: Assembly Name:
  &gt; XamlDesignerFaultInjection | Domain ID: 1 WRN: A partial bind occurs
  &gt; when only part of the assembly display name is provided. WRN: This
  &gt; might result in the binder loading an incorrect assembly. WRN: It is
  &gt; recommended to provide a fully specified textual identity for the
  &gt; assembly, WRN: that consists of the simple name, version, culture, and
  &gt; public key token. WRN: See whitepaper
  &gt; http://go.microsoft.com/fwlink/?LinkId=109270 for more information and
  &gt; common solutions to this issue. LOG: Appbase = file:///C:/Program
  &gt; Files (x86)/Microsoft Visual Studio/VS15Preview/Common7/IDE/ LOG:
  &gt; Initial PrivatePath = NULL LOG: Dynamic Base = NULL LOG: Cache Base =
  &gt; NULL LOG: AppName = devenv.exe Calling assembly : (Unknown).
  &gt; === LOG: This bind starts in default load context. LOG: Using application configuration file:
  &gt; C:\Users\blaze\AppData\Local\Microsoft\VisualStudio\15.0_2f751565\devenv.exe.config
  &gt; LOG: Using host configuration file:  LOG: Using machine configuration
  &gt; file from
  &gt; C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
  &gt; LOG: Policy not being applied to reference at this time (private,
  &gt; custom, partial, or location-based assembly bind). LOG: Attempting
  &gt; download of new URL file:///C:/Program Files (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/XamlDesignerFaultInjection.DLL. LOG:
  &gt; Attempting download of new URL file:///C:/Program Files
  &gt; (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/XamlDesignerFaultInjection/XamlDesignerFaultInjection.DLL.
  &gt; LOG: Attempting download of new URL file:///C:/Program Files
  &gt; (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/PublicAssemblies/XamlDesignerFaultInjection.DLL.
  &gt; LOG: Attempting download of new URL file:///C:/Program Files
  &gt; (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/PublicAssemblies/XamlDesignerFaultInjection/XamlDesignerFaultInjection.DLL.
  &gt; LOG: Attempting download of new URL file:///C:/Program Files
  &gt; (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/PrivateAssemblies/XamlDesignerFaultInjection.DLL.
  &gt; LOG: Attempting download of new URL file:///C:/Program Files
  &gt; (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/PrivateAssemblies/XamlDesignerFaultInjection/XamlDesignerFaultInjection.DLL.
  &gt; LOG: Attempting download of new URL file:///C:/Program Files
  &gt; (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/CommonExtensions/Microsoft/TemplateProviders/XamlDesignerFaultInjection.DLL.
  &gt; LOG: Attempting download of new URL file:///C:/Program Files
  &gt; (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/CommonExtensions/Microsoft/TemplateProviders/XamlDesignerFaultInjection/XamlDesignerFaultInjection.DLL.
  &gt; LOG: Attempting download of new URL file:///C:/Program Files
  &gt; (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/CommonExtensions/Platform/Debugger/XamlDesignerFaultInjection.DLL.
  &gt; LOG: Attempting download of new URL file:///C:/Program Files
  &gt; (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/CommonExtensions/Platform/Debugger/XamlDesignerFaultInjection/XamlDesignerFaultInjection.DLL.
  &gt; LOG: Attempting download of new URL file:///C:/Program Files
  &gt; (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/CommonExtensions/Platform/DiagnosticsHub/XamlDesignerFaultInjection.DLL.
  &gt; LOG: Attempting download of new URL file:///C:/Program Files
  &gt; (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/CommonExtensions/Platform/DiagnosticsHub/XamlDesignerFaultInjection/XamlDesignerFaultInjection.DLL.
  &gt; LOG: Attempting download of new URL file:///C:/Program Files
  &gt; (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/PrivateAssemblies/DataCollectors/XamlDesignerFaultInjection.DLL.
  &gt; LOG: Attempting download of new URL file:///C:/Program Files
  &gt; (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/PrivateAssemblies/DataCollectors/XamlDesignerFaultInjection/XamlDesignerFaultInjection.DLL.
  &gt; LOG: Attempting download of new URL file:///C:/Program Files
  &gt; (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/PrivateAssemblies/DataCollectors/x86/XamlDesignerFaultInjection.DLL.
  &gt; LOG: Attempting download of new URL file:///C:/Program Files
  &gt; (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/PrivateAssemblies/DataCollectors/x86/XamlDesignerFaultInjection/XamlDesignerFaultInjection.DLL.
  &gt; LOG: Attempting download of new URL file:///C:/Program Files
  &gt; (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/XamlDesignerFaultInjection.EXE. LOG:
  &gt; Attempting download of new URL file:///C:/Program Files
  &gt; (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/XamlDesignerFaultInjection/XamlDesignerFaultInjection.EXE.
  &gt; LOG: Attempting download of new URL file:///C:/Program Files
  &gt; (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/PublicAssemblies/XamlDesignerFaultInjection.EXE.
  &gt; LOG: Attempting download of new URL file:///C:/Program Files
  &gt; (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/PublicAssemblies/XamlDesignerFaultInjection/XamlDesignerFaultInjection.EXE.
  &gt; LOG: Attempting download of new URL file:///C:/Program Files
  &gt; (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/PrivateAssemblies/XamlDesignerFaultInjection.EXE.
  &gt; LOG: Attempting download of new URL file:///C:/Program Files
  &gt; (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/PrivateAssemblies/XamlDesignerFaultInjection/XamlDesignerFaultInjection.EXE.
  &gt; LOG: Attempting download of new URL file:///C:/Program Files
  &gt; (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/CommonExtensions/Microsoft/TemplateProviders/XamlDesignerFaultInjection.EXE.
  &gt; LOG: Attempting download of new URL file:///C:/Program Files
  &gt; (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/CommonExtensions/Microsoft/TemplateProviders/XamlDesignerFaultInjection/XamlDesignerFaultInjection.EXE.
  &gt; LOG: Attempting download of new URL file:///C:/Program Files
  &gt; (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/CommonExtensions/Platform/Debugger/XamlDesignerFaultInjection.EXE.
  &gt; LOG: Attempting download of new URL file:///C:/Program Files
  &gt; (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/CommonExtensions/Platform/Debugger/XamlDesignerFaultInjection/XamlDesignerFaultInjection.EXE.
  &gt; LOG: Attempting download of new URL file:///C:/Program Files
  &gt; (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/CommonExtensions/Platform/DiagnosticsHub/XamlDesignerFaultInjection.EXE.
  &gt; LOG: Attempting download of new URL file:///C:/Program Files
  &gt; (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/CommonExtensions/Platform/DiagnosticsHub/XamlDesignerFaultInjection/XamlDesignerFaultInjection.EXE.
  &gt; LOG: Attempting download of new URL file:///C:/Program Files
  &gt; (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/PrivateAssemblies/DataCollectors/XamlDesignerFaultInjection.EXE.
  &gt; LOG: Attempting download of new URL file:///C:/Program Files
  &gt; (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/PrivateAssemblies/DataCollectors/XamlDesignerFaultInjection/XamlDesignerFaultInjection.EXE.
  &gt; LOG: Attempting download of new URL file:///C:/Program Files
  &gt; (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/PrivateAssemblies/DataCollectors/x86/XamlDesignerFaultInjection.EXE.
  &gt; LOG: Attempting download of new URL file:///C:/Program Files
  &gt; (x86)/Microsoft Visual
  &gt; Studio/VS15Preview/Common7/IDE/PrivateAssemblies/DataCollectors/x86/XamlDesignerFaultInjection/XamlDesignerFaultInjection.EXE.
  &gt; LOG: All probing URLs attempted and failed.
  </code></pre>
  
  <p>Is this a bug in Xamarin.Forms or XamlCTask? Has anyone encountered this issue or knows how to fix it?</p>
  
  <ul>
  <li>Windows 10 64-bit </li>
  <li>Visual Studion 15 Preview 5</li>
  <li>Xamarin 4.2.1.14</li>
  <li>Xamarin.Forms 2.3.3.163-pre3  </li>
  </ul>
  
  <p>Thanks in advance</p>