Mar*_*ins 4 windows nuget nuget-package visual-studio-2015 uwp
我最近在 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).
Run Code Online (Sandbox Code Playgroud)
环顾四周,我在“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": {}
}
}
Run Code Online (Sandbox Code Playgroud)
我的问题是:每个“运行时”和附加了“-aot”的等效运行时有什么区别?
我看过一些帖子,表明如果我想使用不支持它们的 nuget 包,我可以删除这些运行时,但我更愿意只在知道它们是什么的情况下删除它们。
注意:我不知道这是否有什么不同,但我正在构建的 UWP 应用程序预计只会被侧载(它是一个业务应用程序)。然而,它可能最终需要通过 Windows商业应用商店分发,以简化更新等。
谢谢。
运行时是一个通用术语,指代运行代码的任何库、框架或平台。win10-arm 和 win10-arm-aot 运行时是不同的平台。这是维基百科:运行时系统。此外,根据 Wikipedia Ahead-of-time (AOT):
提前 (AOT) 编译是将高级编程语言(例如 C 或 C++)或中间语言(例如 Java 字节码或 .NET 通用中间语言 (CIL) 代码)编译为本机(系统-dependent) 机器代码,目的是在本地执行生成的二进制文件。一些具有可编译为中间语言的托管代码运行时的编程语言,利用即时 (JIT)
所以我同意 Hans Passant 的观点,AOT 编译器与 System.Reflection.Emit.ILGeneration 包不兼容。所以如果你想使用这个包,你可以删除这些 aot 运行时。
| 归档时间: |
|
| 查看次数: |
1841 次 |
| 最近记录: |