我想提高我的Xamarin.Forms UWP应用程序的性能,因为它在发布模式下非常慢(".NET native"选中).所以我在PCL项目的汇编级应用XAMLC:
[assembly: XamlCompilation (XamlCompilationOptions.Compile)]
namespace MyApp
{
}
Run Code Online (Sandbox Code Playgroud)
但是使用此属性我收到运行时错误:
"未找到方法:'Void Xamarin.Forms.Xaml.Internals.SimpleValueTargetProvider..ctor(System.Object [])'."
根据这个:
SimpleValueTargetProvider类有2个版本:
我使用Xamarin.Forms 2.3.3.163-pre3所以我在我的项目中使用第二个版本(当我导航到Xamarin.Forms.Xaml.Internals中的SimpleValueTargetProvider时,我可以看到带有2个参数的构造函数).我的理解是,显然"某些东西"仍在调用SimpleValueTargetProvider 1.5.0.0,但我不知道它是什么.
我删除了所有第三方组件,但没有帮助.我使用融合日志来了解发生了什么,但这是我得到的(说实话我不知道这是否与我面临的问题有关):
> *** Assembly Binder Log Entry (10/26/2016 @ 9:09:42 PM) ***
>
> The operation failed. Bind result: hr = 0x80070002. The system cannot
> find the file specified.
>
> Assembly manager loaded from:
> C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll Running under
> executable C:\Program Files (x86)\Microsoft Visual
> Studio\VS15Preview\Common7\IDE\devenv.exe
> --- A detailed …Run Code Online (Sandbox Code Playgroud)