我試圖將我的項目從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 –