linux - Raspbian 上的 Mono 和 MongoDB

标签 linux mongodb mono raspbian

我在 Visual Studio 中编写并测试了 C# 应用程序。

..但现在需要在 Raspberry PI 上与 Mono 交叉编译(设置为 headless 服务器)。

我在使用 MongoDB 驱动程序时遇到问题 - 它在构建中默认不可用。

我包括这个..它在 Windows 上运行良好

using MongoDB.Bson;
using MongoDB.Driver;

但是在 RasPi 上的 Linux 中,这是错误:

error CS0246: The type or namespace name `MongoDB' could not be found. Are you missing an assembly reference?

我可以使用 apt-get 安装 MongodB 驱动程序吗?

或者..这个存储库应该对我有帮助...如果我可以编译它..

https://github.com/mongodb/mongo-csharp-driver

我该如何去做呢?克隆存储库并运行 build.sh ?

一旦我这样做了,这就是将其包含在我的构建中的命令吗?

Something like:  "mcs pkg:mongodb.pkg myapp.cs" 

如有任何建议,我们将不胜感激

最佳答案

mono documentation在页面底部讨论如何包含包。据我所知,您需要类似 mcs -pkg:mongodb myapp.cs.

关于linux - Raspbian 上的 Mono 和 MongoDB,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31131548/

相关文章:

c - 选择阻止 fifo 读取

mongodb - ReactiveMongo 和 JSON4S

javascript - 如何在没有 MongoLab 的情况下将本地 MongoDB 数据库连接到我的 Android Studio 应用程序?

c# - 在 Ubuntu 环境中使用 MonoDevelop 将 C# 代码交叉编译为 Colibri iMX6 (Linux) exe

c# - Xamarin 缺少引用

c# - Mono 和 Microsoft .Net 程序集如何具有相同的公钥 token ?

c - Linux 中匿名内存映射映射到哪个文件?

c - Malloc( ) - 在新页面请求或重新循环先前分配的内存之间做出决定

linux - 为什么从 "find: paths must precede expression"返回多个结果时会触发错误 "find"

javascript - 获取 template.foo.rendered 中集合实例的 this._id