簡體   English   中英

如何在Xamarin中安裝.net mongodb驅動程序nuget包

[英]how to install .net mongodb driver nuget package in xamarin

Xamarin是否可以與.NET mongodb驅動程序一起使用? 試圖通過Nuget安裝Mongo 2.2.3軟件包,但出現以下錯誤:

Adding MongoDB.Driver...
Attempting to resolve dependency 'MongoDB.Bson (≥ 2.2.3)'.
Attempting to resolve dependency 'MongoDB.Driver.Core (≥ 2.2.3)'.
Adding 'MongoDB.Bson 2.2.3' to mdb.
Could not install package 'MongoDB.Bson 2.2.3'. You are trying to install this package into a project that targets 'Xamarin.iOS,Version=v1.0', 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.

有人對這個有經驗么??

謝謝,

克里斯

MongoDB.Bson NuGet程序包僅支持.NET 4.5,因此無法將其安裝到Xamarin.iOS項目中。

如果要使用MongoDB,則很可能需要創建一個與MongoDB對話的后端服務,您的移動應用程序可以通過http與之對話。

有第三方托管公司,例如mLab ,提供了REST API來訪問MongoDB。

否則,您可以將Couchbase視為替代產品,它通過Xamarin的組件存儲支持Xamarin.Android和Xamarin.iOS。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM