小编Bla*_*zey的帖子

Xamarin.Forms - XamlCompilation MissingMethodException

我想提高我的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 [])'."

根据这个:

https://github.com/xamarin/Xamarin.Forms/blob/master/docs/Xamarin.Forms.Xaml/Xamarin.Forms.Xaml.Internals/SimpleValueTargetProvider.xml

SimpleValueTargetProvider类有2个版本:

  • 1.5.0.0 - 带有一个参数System.Object []的构造函数
  • 2.0.0.0 - 具有2个参数System.Object []和System.Object的构造函数

我使用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)

.net c# xaml xamarin xamarin.forms

7
推荐指数
1
解决办法
3466
查看次数

标签 统计

.net ×1

c# ×1

xamarin ×1

xamarin.forms ×1

xaml ×1