【发布时间】:2017-06-19 21:25:54
【问题描述】:
我最近在 Visual Studio 2015 中创建了一个空白 UWP 应用程序,然后尝试向该应用程序添加一个 nuget 包。软件包安装失败并导致输出窗口中出现以下消息...
System.Reflection.Emit.ILGeneration 4.0.1 provides a compile-time reference assembly for System.Reflection.Emit.ILGeneration on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-arm-aot.
One or more packages are incompatible with UAP,Version=v10.0 (win10-arm-aot).
System.Reflection.Emit.ILGeneration 4.0.1 provides a compile-time reference assembly for System.Reflection.Emit.ILGeneration on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x64-aot.
One or more packages are incompatible with UAP,Version=v10.0 (win10-x64-aot).
System.Reflection.Emit.ILGeneration 4.0.1 provides a compile-time reference assembly for System.Reflection.Emit.ILGeneration on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x86-aot.
One or more packages are incompatible with UAP,Version=v10.0 (win10-x86-aot).
环顾四周,我在“project.json”中找到了对“运行时”的引用; (我的看起来像这样)...
{
"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.1.0"
},
"frameworks": {
"uap10.0": {}
},
"runtimes": {
"win10-arm": {},
"win10-arm-aot": {},
"win10-x86": {},
"win10-x86-aot": {},
"win10-x64": {},
"win10-x64-aot": {}
}
}
我的问题是:每个“运行时”与附加“-aot”的等效运行时有什么区别?
我看到一些帖子表明,如果我想使用不支持它们的 nuget 包,我可以删除这些运行时,但我宁愿只删除它们知道它们是什么。
注意:我不知道这是否有任何区别,但我正在构建的 UWP 应用程序预计只会被侧面加载(它是一个业务线应用程序)。然而,它最终可能需要通过 Windows Business Store 分发,以简化更新等。
谢谢。
【问题讨论】:
-
意思是“提前”。与“及时”相反。描述程序集中的中间代码编译为机器代码的方式。 UWP 中的 AOT 编译器更广为人知的是 .NET Native。是的,与 Reflection.Emit 完全不兼容,因为它总是需要即时编译器。你不能在 UWP 应用中使用它。
-
@Martin Robins,这个问题有什么更新吗?你能从下面的答案中得到有用的信息吗?
-
你是不是通过修改project.json文件解决了这个问题?
标签: windows visual-studio-2015 uwp nuget nuget-package