List<Type> 缺少互操作类型编组数据 - .NET Native

List<Type> is missing interop type marshalling data - .NET Native

我有一个项目在没有 .NET Native 工具链的情况下运行得很好,但是一旦我激活它,我就得到一个关于缺少互操作类型编组数据的异常:

System.Collections.Generic.List`1[Type] is missing interop type marshalling data. To enable interop type marshalling data, add a MarshalObject directive to the application rd.xml file.

我试图在 Default.rd.xml 文件中添加整个命名空间:

<Namespace Name="System.Collections.Generic" Dynamic="Required All"/>

但没用。

我应该放什么才能使项目与 .NET Native 一起工作?

启用单个 type/whole 命名空间有什么区别?对性能、内存或其他方面有影响吗?

我已经尝试了多种不同的组合 DynamicMarshalObject<Namespace...> and/or <Type...> 最后发现我只漏了括号 {}:

<Type Name="System.Collections.Generic.List{}" MarshalObject="Required All"/>