realm dot net base 示例不编译

The realm dot net base example does not compile

我无法让示例 "QuickJournal" 在 iOS 上编译。代码编译正常,但在 Fody 步骤中失败。

目标

通过以下方式试用 .NET 示例应用程序 - 拉取存储库 - 在 examples/QuickJournal 中打开解决方案 - 编译和测试

预期结果

流畅的编译&测试体验

实际结果

Fody 内存不足异常

重现步骤

查看设置,按照步骤操作 我正在使用最新的 Xamarin/Visual Studio Mac/XCode

代码示例

正则境源码

领域和工具的版本

git 克隆 https://github.com/realm/realm-dotnet.git

git结帐8f5e36ffd91e06b9c60b91f9de3fb312b411a4a4

我得到的异常是
Fody:在“~/realm-dotnet/examples/QuickJournal/QuickJournal/obj/Debug/QuickJournal.pdb”找到调试符号。 MSBUILD:错误:Fody:发生未处理的异常: MSBUILD:错误:异常: MSBUILD:错误:内存不足 MSBUILD:错误:StackTrace: MSBUILD:错误:在(包装器分配)System.Object:AllocVector(intptr,intptr) MSBUILD:错误:在 Microsoft.Cci.Pdb.MsfDirectory..ctor (Microsoft.Cci.Pdb.PdbReader reader,

查看日志文件 RealmCompilelog.txt

Realm 1.2.1 通过使用更新版本的 Fody 解决了这个问题。

旧 Realm 版本的回答: 这是由 Mono 5.0 的 Cecil bug 引起的。由于 Realm 依赖于使用 Cecil 的 Fody,因此引用它的项目编译将失败。在发布新的 Cecil 和 Fody 版本之前,解决方法是恢复到 Mono 4.8: