我在我的 .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版本,并且我如何强制执行以消除警告?