我正在使用Visual Studio 2017上的UWP Projet。 我无法从Nuget Package安装程序安装Microsoft.Owin。 我使用的是.NET Framework 4.7版
这是我的错误
Restoring packages for c:\users\79037\documents\visual studio 2017\Projects\Epicture472\Epicture472\Epicture472.csproj...
Package Microsoft.Owin 3.1.0 is not compatible with uap10.0.10586 (UAP,Version=v10.0.10586). Package Microsoft.Owin 3.1.0 supports: net45 (.NETFramework,Version=v4.5)
Package Owin 1.0.0 is not compatible with uap10.0.10586 (UAP,Version=v10.0.10586). Package Owin 1.0.0 supports: net40 (.NETFramework,Version=v4.0)
One or more packages are incompatible with UAP,Version=v10.0.10586.
Package Microsoft.Owin 3.1.0 is not compatible with uap10.0.10586 (UAP,Version=v10.0.10586) / win10-arm. Package Microsoft.Owin 3.1.0 supports: net45 (.NETFramework,Version=v4.5)
Package Owin 1.0.0 is not compatible with uap10.0.10586 (UAP,Version=v10.0.10586) / win10-arm. Package Owin 1.0.0 supports: net40 (.NETFramework,Version=v4.0)
One or more packages are incompatible with UAP,Version=v10.0.10586 (win10-arm).
Package Microsoft.Owin 3.1.0 is not compatible with uap10.0.10586 (UAP,Version=v10.0.10586) / win10-arm-aot. Package Microsoft.Owin 3.1.0 supports: net45 (.NETFramework,Version=v4.5)
Package Owin 1.0.0 is not compatible with uap10.0.10586 (UAP,Version=v10.0.10586) / win10-arm-aot. Package Owin 1.0.0 supports: net40 (.NETFramework,Version=v4.0)
One or more packages are incompatible with UAP,Version=v10.0.10586 (win10-arm-aot).
Package Microsoft.Owin 3.1.0 is not compatible with uap10.0.10586 (UAP,Version=v10.0.10586) / win10-x64. Package Microsoft.Owin 3.1.0 supports: net45 (.NETFramework,Version=v4.5)
Package Owin 1.0.0 is not compatible with uap10.0.10586 (UAP,Version=v10.0.10586) / win10-x64. Package Owin 1.0.0 supports: net40 (.NETFramework,Version=v4.0)
One or more packages are incompatible with UAP,Version=v10.0.10586 (win10-x64).
Package Microsoft.Owin 3.1.0 is not compatible with uap10.0.10586 (UAP,Version=v10.0.10586) / win10-x64-aot. Package Microsoft.Owin 3.1.0 supports: net45 (.NETFramework,Version=v4.5)
Package Owin 1.0.0 is not compatible with uap10.0.10586 (UAP,Version=v10.0.10586) / win10-x64-aot. Package Owin 1.0.0 supports: net40 (.NETFramework,Version=v4.0)
One or more packages are incompatible with UAP,Version=v10.0.10586 (win10-x64-aot).
Package Microsoft.Owin 3.1.0 is not compatible with uap10.0.10586 (UAP,Version=v10.0.10586) / win10-x86. Package Microsoft.Owin 3.1.0 supports: net45 (.NETFramework,Version=v4.5)
Package Owin 1.0.0 is not compatible with uap10.0.10586 (UAP,Version=v10.0.10586) / win10-x86. Package Owin 1.0.0 supports: net40 (.NETFramework,Version=v4.0)
One or more packages are incompatible with UAP,Version=v10.0.10586 (win10-x86).
Package Microsoft.Owin 3.1.0 is not compatible with uap10.0.10586 (UAP,Version=v10.0.10586) / win10-x86-aot. Package Microsoft.Owin 3.1.0 supports: net45 (.NETFramework,Version=v4.5)
Package Owin 1.0.0 is not compatible with uap10.0.10586 (UAP,Version=v10.0.10586) / win10-x86-aot. Package Owin 1.0.0 supports: net40 (.NETFramework,Version=v4.0)
One or more packages are incompatible with UAP,Version=v10.0.10586 (win10-x86-aot).
Package restore failed. Rolling back package changes for 'Epicture472'.
Time Elapsed: 00:00:01.4498990
========== Finished ==========
答案 0 :(得分:2)
正如您的错误列表所示; Microsoft.Owin与UWP项目不兼容。事实上,UWP甚至不在.NET Framework上运行(因此安装的版本无关紧要);而是在.NET Core上运行。
您需要找到一个针对.NET Standard UWP实现版本的不同库。今天是1.4或之前。您可以在MSDN
上查看当前的平台列表以及它们实现的.NET Standard版本