gpt4 book ai didi

c# - List> 的运行时指令

转载 作者:行者123 更新时间:2023-11-30 17:39:24 25 4
gpt4 key购买 nike

我得到一个 MissingMetadataException在 Windows 10 通用应用程序的发布版本中 System.Collections.Generic.List<Nullable<System.Int32>>并且无法弄清楚如何应用运行时指令。

我已经为更简单的情况成功添加了一个指令,System.Collections.Generic.List<System.Int32> ,看起来像这样:

<TypeInstantiation Name="System.Collections.Generic.List" Arguments="System.Int32" Dynamic="Required Public" />

但我似乎无法正确定义嵌套泛型的指令。我已经尝试了很多变体,主要是按照以下思路:

 <TypeInstantiation Name="System.Collections.Generic.List" Arguments="System.Nullable" Dynamic="Required Public"  >
<TypeInstantiation Name="System.Nullable" Arguments="System.Int32" Dynamic="Required Public" />
</TypeInstantiation>

在这里处理嵌套泛型类型的正确方法是什么?

最佳答案

一些建议。如果您为 DEBUG 启用 .NET Native(项目属性 > BUILD > 启用 .NET Native 的复选框),您将获得更好的整体调试体验。特别是,您将从异常中获得更多有用的消息,因为 DEBUG 配置保存了制作漂亮的错误对话框所需的资源字符串。我怀疑它会将您指向此页面 http://dotnet.github.io/native/troubleshooter/type.html这应该可以帮助您上路。

关于c# - List<Nullable<T>> 的运行时指令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35566785/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com