c# - .Net Native - 类型不包含在编译中

标签 c# .net win-universal-app .net-native

我在通用应用程序平台 - Windows 10 的 .net native 编译过程中发现了奇怪的警告消息。

C:\Program Files (x86)\MSBuild\Microsoft.NetNative\x86\ilc\IlcInternals.targets(886,5): warning : Type 'Windows.UI.Xaml.Controls.Image' was not included in compilation, but was referenced in type 'XT.Controls.VideoPlayer.VideoPlayerControl'. There may have been a missing assembly.

C:\Program Files (x86)\MSBuild\Microsoft.NetNative\x86\ilc\IlcInternals.targets(886,5): warning : Type 'Windows.UI.Xaml.Controls.Button' was not included in compilation, but was referenced in type 'XT.Controls.VideoPlayer.VideoPlayerControl'. There may have been a missing assembly.

应用程序在 Release模式下无法正常工作。我在出现需要调试 RuntimeType.cs(缺失)的 MissingMetadataException 启动画面后崩溃。

关于如何在编译中包含这些类型有什么想法吗?

最佳答案

关于汉斯的链接问题是通过这行代码解决的。 添加到项目属性 Default.rd.xml

<Namespace Name="Windows.UI.Xaml" Dynamic="Required All" Serialize="Required Public" Browse="Required All" Activate="Required All" />

关于c# - .Net Native - 类型不包含在编译中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32713558/

相关文章:

c# - 关于 Controller 使用的问题

c# - 使用 C# 检查 IIS 中是否启用了表单例份验证

c# - 事件处理程序无法在 Windows Universal App 中使用 inkCanvas

c# - .NET/C# 的拼写检查器

c# - 等待任务的行为不符合我的预期

xaml - UWP ListView 在索引 0 处插入项目时防止滚动

c# - Exception.Message 中的换行符

c# - 正则表达式贪心问题(C#)

android - FasterXML Jackson ObjectMapper for .Net MVC4 JSON POST 结果类型对象

.net - CaSTLe Windsor 将命名组件映射到特定属性