我正在尝试在我的项目中更新Microsoft.NETCore.UniversalWindowsPlatform Nuget,但我无法这样做。我目前正在使用5.1.0,我正在尝试更新到5.2.2。我尝试更新时的输出如下所示:
Restoring packages for 'MyApp'.
Restoring packages for C:\Users\Shayon\uwp\src\MyApp\project.json...
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.
Some packages are not compatible 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.
Some packages are not compatible 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.
Some packages are not compatible with UAP,Version=v10.0 (win10-x86-aot).
Package restore failed for 'MyApp'.
Package restore failed. Rolling back package changes for 'MyApp'.
========== Finished ==========
我不确定如何解释此错误消息。是说UWP不支持反射吗?
我已经尝试清除我的nuget缓存并恢复。我也试过卸载5.1.0并直接安装到5.2.2。我正在使用Nuget版本3.4.4和VS 2015.我还应该提到我已经能够在同一解决方案中更新其他项目的nuget而没有问题。如果相关,我的通用Windows最低版本为(10.0; Build 10240)
,我的目标版本为(10.0; Build 10586)
知道这里出了什么问题吗?
答案 0 :(得分:6)
这对我有用:
Microsoft.NETCore.UniversalWindowsPlatform
5.2.2包开始添加nuget包。遵循此过程是允许我更新Microsoft.NETCore.UniversalWindowsPlatform
包以及所有其他包含错误的包,例如Automapper 4.2.1到5.0.2。
答案 1 :(得分:2)
更新到Microsoft.NETCore.UniversalWindowsPlatform:5.2.2是正确的修复。每当处理使用netstandard的软件包时都需要此软件包。