【发布时间】:2017-10-08 10:44:22
【问题描述】:
我在我的 .Net Core 1.0 项目中使用了 nuget 包 sqlite-net-pcl,该项目运行没有任何问题(使用了该包的 .Net Standard 1.1 版本)。现在,我将此项目升级到 .Net Core 2.0,但突然收到以下构建警告:
1>C:\Projects\Project.csproj : warning NU1701: Package 'SQLitePCLRaw.lib.e_sqlite3.linux 1.1.5' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.
1>C:\Projects\Project.csproj : warning NU1701: Package 'SQLitePCLRaw.lib.e_sqlite3.osx 1.1.5' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.
1>C:\Projects\Project.csproj : warning NU1701: Package 'SQLitePCLRaw.lib.e_sqlite3.v110_xp 1.1.5' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.
显然,我的 .Net Core 2.0 项目现在使用 .Net Framework 4.6.1 版本的 nuget 包,即使有可用的 .Net Standard 1.1 版本。我知道使用 .Net Core 2.0 这是可能的,但我也知道由于兼容性原因这并不总是有效,那么为什么 nuget 不直接使用实际有效的 .Net Standard 1.1 版本,我该如何强制消除警告?
【问题讨论】: