在我的.et Core 2.0项目中,使用.et FW包而不是.et Standard(警告U1701)(In my .et Core 2.0 project, .et FW package is used instead of .et Standard (warning U1701))
我在我的.et Core 1.0项目中使用了nuget软件包sqlite-net-pcl ,该项目没有任何问题(使用.et标准1.1版本的软件包)。 现在,我将这个项目升级到了.et Core 2.0,并且突然间我收到了这些构建警告:
1>C:\Projects\ : warning U1701: Package 'SQLitePCLRaw._sqlite.linux 1.1.5' was restored using '.ETFramework,Version=v4.6.1' instead of the project target framework '.ETCoreApp,Version=v2.0'. This package may not be fully compatible with your project. 1>C:\Projects\ : warning U1701: Package 'SQLitePCLRaw._ 1.1.5' was restored using '.ETFramework,Version=v4.6.1' instead of the project target framework '.ETCoreApp,Version=v2.0'. This package may not be fully compatible with your project. 1>C:\Projects\ : warning U1701: Package 'SQLitePCLRaw._sqlite.v110_xp 1.1.5' was restored using '.ETFramework,Version=v4.6.1' instead of the project target framework '.ETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.很明显,我的.et Core 2.0项目现在使用nuget包的.et Framework 4.6.1版本,即使有.et Standard 1.1版本可用。 我知道使用.et Core 2.0这是可能的,但我也知道这并不总是工作,因为兼容性的原因,所以为什么不nuget只使用。净标准1.1版本,这将实际工作,我怎样才能强迫消除警告?
I was using the nuget package sqlite-net-pcl in my .et Core 1.0 project which was working without any problems (the .et Standard 1.1 version was used of the package). ow, I upgraded this project to .et Core 2.0 and suddenly I'm getting these build warnings:
1>C:\Projects\ : warning U1701: Package 'SQLitePCLRaw._sqlite.linux 1.1.5' was restored using '.ETFramework,Version=v4.6.1' instead of the project target framework '.ETCoreApp,Version=v2.0'. This package may not be fully compatible with your project. 1>C:\Projects\ : warning U1701: Package 'SQLitePCLRaw._ 1.1.5' was restored using '.ETFramework,Version=v4.6.1' instead of the project target framework '.ETCoreApp,Version=v2.0'. This package may not be fully compatible with your project. 1>C:\Projects\ : warning U1701: Package 'SQLitePCLRaw._sqlite.v110_xp 1.1.5' was restored using '.ETFramework,Version=v4.6.1' instead of the project target framework '.ETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.Obviously, my .et Core 2.0 project is now using the .et Framework 4.6.1 version of the nuget package, even if there's a .et Standard 1.1 version available. I know that with .et Core 2.0 this is possible, but I also know that this doesn't always work because of compatibility reas, so why doesn't nuget just use the .et Standard 1.1 versi which will actually work and how can I force that to eliminate the warnings?
最满意答案
它看起来像是特定于SQLitePCLRaw.sqlite.*版本的依赖包,它们是SQLitePCLRaw.bundle_green / sqlite-net-pcl的.ET Core / .ET标准片的传递依赖。 这可能也是特定于1.1.5版本的这些软件包,因为最新版本( 1.1.8 )的创作方式不同,以指示支持的平台 - 1.1.5软件包不包含lib文件夹,仅包含runtimes文件夹和没有依赖关系组,因此uGet对支持的框架感到困惑,并假定该软件包是为.ET Framework创作的。 新版本通过为包含虚拟_._文件的受支持框架提供一个带有子文件夹的lib文件夹来解决此问题。
如果你想确保你的依赖关系图中只包含明确支持.ET Standard或.ET Core的包(不管你的项目目标是什么),你可以将它添加到你的项目文件中:
<PropertyGroup> <DisableImplicitAssetTargetFallback>true</DisableImplicitAssetTargetFallback> </PropertyGroup>It looks like this is very specific to the versi of dependent packages SQLitePCLRaw.sqlite.* which are transitive dependencies of the .ET Core / .ET Standard slices of SQLitePCLRaw.bundle_green / sqlite-net-pcl. This probably is also specific to the 1.1.5 version of these packages, since the latest versi (1.1.8) are authored differently to indicate supported platforms - the 1.1.5 packages don't contain a lib folder, only a runtimes folder and no dependency groups so uGet is confused about the supported frameworks and assumes the package was authored for .ET Framework. The newer versi solve this by having a lib folder with subfolders for the supported frameworks containing a dummy _._ file.
If you want to ensure you only have packages in your dependency graph that explicitly support .ET Standard or .ET Core (whatever your project targets), you can add this to your project file:
<PropertyGroup> <DisableImplicitAssetTargetFallback>true</DisableImplicitAssetTargetFallback> </PropertyGroup>#感谢您对电脑配置推荐网 - 最新i3 i5 i7组装电脑配置单推荐报价格的认可,转载请说明来源于"电脑配置推荐网 - 最新i3 i5 i7组装电脑配置单推荐报价格
推荐阅读
留言与评论(共有 11 条评论) |
本站网友 张宪华 | 0秒前 发表 |
since the latest versi (1.1.8) are authored differently to indicate supported platforms - the 1.1.5 packages don't contain a lib folder | |
本站网友 东方雅苑二手房 | 4分钟前 发表 |
所以为什么不nuget只使用 | |
本站网友 光子美白嫩肤 | 30分钟前 发表 |
我的.et Core 2.0项目现在使用nuget包的.et Framework 4.6.1版本 | |
本站网友 江门二手房信息 | 23分钟前 发表 |
Version=v2.0'. This package may not be fully compatible with your project. 1>C | |
本站网友 深圳市图书馆 | 17分钟前 发表 |
并且突然间我收到了这些构建警告: 1>C | |
本站网友 经济学家论坛 | 21分钟前 发表 |
我怎样才能强迫消除警告? I was using the nuget package sqlite-net-pcl in my .et Core 1.0 project which was working without any problems (the .et Standard 1.1 version was used of the package). ow | |
本站网友 银行贷款计算器 | 19分钟前 发表 |
以指示支持的平台 - 1.1.5软件包不包含lib文件夹 | |
本站网友 市场占有率 | 29分钟前 发表 |
only a runtimes folder and no dependency groups so uGet is confused about the supported frameworks and assumes the package was authored for .ET Framework. The newer versi solve this by having a lib folder with subfolders for the supported frameworks containing a dummy _._ file. If you want to ensure you only have packages in your dependency graph that explicitly support .ET Standard or .ET Core (whatever your project targets) | |
本站网友 deallocate | 30分钟前 发表 |
but I also know that this doesn't always work because of compatibility reas | |
本站网友 huafei | 15分钟前 发表 |
现在 |