我正在尝试将我的项目从SQLite.Net-PCL转换为SQLite.Net(最新的稳定版本;1.3.1),正如它在Xamarin与数据库的合作上说的那样,但是当我安装它时,它必须安装40个软件包(大约),如下所示
Microsoft.NETCore.Platforms 1.0.1
Microsoft.NETCore.Targets 1.0.1
runtime.native.System 4.0.0
SQLitePCLRaw.core 1.1.2
SQLitePCLRaw.bundle_green 1.1.2
System.Collections 4.0.11
System.Collections.Concurrent 4.0.12
System.Diagnostics.Debug 4.0.11
System.Diagnostics.Tools 4.0.1
System.Diagnostics.Tracing 4.1.0
System.Globalization 4.0.11
System.IO 4.1.0
System.IO.Compression 4.1.0
System.Linq 4.1.0
System.Linq.Expressions 4.1.0
System.Net.Http 4.1.0
System.Net.Primitives 4.0.11
System.ObjectModel 4.0.12
System.Reflection 4.1.0
System.Reflection.Extensions 4.0.1
System.Reflection.Primitives 4.0.1
System.Resources.ResourceManager 4.0.1
System.Runtime 4.1.0
System.Runtime.Extensions 4.1.0
System.Runtime.InteropServices 4.1.0
System.Runtime.Numerics 4.0.1
System.Text.Encoding 4.0.11
System.Text.Encoding.Extensions 4.0.11
System.Text.RegularExpressions 4.1.0
System.Threading 4.0.11
System.Runtime.InteropServices.RuntimeInformation 4.0.0
System.Threading.Tasks 4.0.11
System.Xml.ReaderWriter 4.0.11
System.Xml.XDocument 4.0.11
NETStandard.Library 1.6.0
sqlite-net-pcl 1.3.1我知道它需要一些软件包,但在我看来,它似乎是很多包。我使用的是Xamarin.Forms版本2.3.3.180 (最新的稳定版本)
如果我继续安装,就会发生这样的错误
Could not install package 'System.Runtime.InteropServices.RuntimeInformation 4.0.0'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile111', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.我如何安装SQLite,这样我就可以在Android上继续使用SQLite了?
现在我有了这些目标
.NET Framework 4.5
Windows 8
ASP.NET Core 1.0 (I do not know why this is set)
Windows Phone 8.1 (I am not using this, but it says I have to reinstall all Nuget packages, if I want to remove it)
Xamarin.Android
Xamarin.iOS
Xamarin.iOS (Classic)
Xamarin.Mac (neither using this)我必须删除目标,我没有使用和重新安装所有Nuget软件包?
我正在使用这些NuGet包
Acr.UserDialogs
ExifLib.PCL
Microsoft.NETCore.UniversalWindowsPlatform
MR.Gestures
Newtonsoft.Json
Xam.Plugin.Media
Xam.Plugins.Settings
Xamarin.Forms
Xamarin.Insights
Xamarin.UITest
XLabs.Forms
ZXing.Net.Mobile.Forms发布于 2017-02-14 10:35:13
发布于 2017-02-14 09:17:29
恐怕你得照你说的做。我有一个类似的问题(幸运的是,这是一个新的项目),我没有别的办法,然后就这样做了。您必须删除每个nuget包,更改目标以删除导致此错误的目标,然后重新安装所有软件包。我建议你一个接一个地移除目标,试着安装sqlite。您将能够隔离导致错误的目标。
发布于 2017-06-18 02:47:09
我已将该库移植到纯.NET标准。我已经将其简化为一个在所有平台上工作的库: android、iOS、uwp等,但我删除了orm功能。https://github.com/MelbourneDeveloper/SQLite.Net.Standard
NuGet: SQLite.Net.Standard
https://stackoverflow.com/questions/42220017
复制相似问题