我最近在Visual Studio 2015中創建了一個空白的UWP應用程序,然後嘗試將nuget包添加到該應用程序。該軟件包安裝失敗,並導致在輸出窗口下面messasges ...通用Windows平臺/ UAP:什麼是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-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 業務分銷,以便於更新等。
謝謝。
它意味着「提前」。與「及時」相反。介紹程序集中的中間代碼被編譯爲機器代碼的方式。 UWP中的AOT編譯器被稱爲.NET Native。是的,與Reflection.Emit完全不兼容,因爲它總是需要即時編譯器。你不能在UWP應用程序中使用它。 –
@Martin Robins,這個問題的任何更新?你能從下面的答案中獲得有用的信息嗎? –