Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/opencv/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
启用.Net本机工具链的Xamarin.Forms应用程序上缺少RuntimeArtifactException_Xamarin.forms_Uwp_.net Standard 2.0 - Fatal编程技术网

启用.Net本机工具链的Xamarin.Forms应用程序上缺少RuntimeArtifactException

启用.Net本机工具链的Xamarin.Forms应用程序上缺少RuntimeArtifactException,xamarin.forms,uwp,.net-standard-2.0,Xamarin.forms,Uwp,.net Standard 2.0,我有一个Xamarin.Forms应用程序(UWP,使用.Net标准2.0;目标Windows版本:10 Fall Creators Update),它在没有.Net本机工具链的情况下运行完美。但当我在项目设置中启用.Net本机工具链时,我会在运行时检索异常: System.Reflection.MissingRuntimeArtifactException: 'Cannot retrieve a MethodInfo for this delegate because the method i

我有一个Xamarin.Forms应用程序(UWP,使用.Net标准2.0;目标Windows版本:10 Fall Creators Update),它在没有.Net本机工具链的情况下运行完美。但当我在项目设置中启用.Net本机工具链时,我会在运行时检索异常:

System.Reflection.MissingRuntimeArtifactException: 'Cannot retrieve a MethodInfo for this delegate because the method it targeted (Void Xamarin.Forms.Platform.UWP.Platform.OnPageAlert(Object, AlertArguments)) was not enabled for metadata using the Dynamic attribute. For more information, please visit http://go.microsoft.com/fwlink/?LinkID=616868'
似乎我必须修改UWP项目中的default.rd.xml文件。但我不知道该怎么做

我补充说

<Type Name="Xamarin.Forms.Platform.UWP.Platform" Serialize="Required All" Dynamic="Required All"/>

但是没有结果。和以前一样的例外。 谁能给我一个提示,如何解决这个问题

干杯,
Chris

我今天在ARM64的调试模式中遇到了相同的错误,这里.Net Native始终处于启用状态,这里我将这些条目添加到了
Default.rd.xml

<Type Name="Xamarin.Forms.Platform.UWP.WindowsPlatformServices" Serialize="Required All" />
<Type Name="Xamarin.Forms.Platform.UWP.Platform" Serialize="Required All" Dynamic="Required All">
  <MethodInstantiation Name="OnPageAlert" Arguments="System.Object" Dynamic="Required" />
</Type>


现在错误消息消失了。

不确定它是否有效,但官方文档共享与此类异常相关的内容。试试看怎么样?你是说包括装配?我已经用同样的结果做了;(