我试图将我的项目从SQLite.Net-PCL转换为sqlite-net-pcl(最新稳定版本; 1.3.1),因为它在Xamarin's working with databases上表示,但是当我安装它,它必须安装40包(左右)以下无法在Xamarin中安装SQLite-Net-pcl
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.
如何安装源码网-PCL,所以我可以继续在Android N上使用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
这是如果我以这种方式更新,我还需要更新到.NET Standard 1.6吗? –
嗯,我不认为你将能够从PCL中移除目标以使其工作。我认为sqlite- net-pcl 1.2.1现在是正确的方式。在某些时候,你可以将你的PCL升级到.NetStandard,然后你可以使用sqlite-net-pcl 1.3.1,但是我不知道它如何与表单配合使用。这里有一些链接https://xamarinhelp.com/dot-net-standard-pcl-xamarin-forms/ https://xamarinhelp.com/net-standard-xamarin-forms-gotchas/ –
谢谢你的帮助Iain Smith –