1

I’m trying to add Realm to Xamarin project.

Project contain two platform-specific projects (Android and iOS) and PCL (.NET framework).

I can successfully add realm separately to each platform, but when I’m trying to move my code to PCL, I have an error “Fody not properly installed. PCLNamespace.MyRealmObject is a RealmObject but has not been woven.”.

I added NuGet Realm package to each project and PCL.

I tried Realm documentation FAQ “Failing to Weave” and most of solutions from similar issue "Xamarin android Crash"

Non of that helped.

Marek Loose
  • 1,115
  • 13
  • 17

2 Answers2

1

Finally I found what was blocking PCL to use realm. I’m posting an answer for those who would come across similar issue.

When I created new PCL I could add and use Realm without any errors. Making a diff of both PCLs give me an answer; faulty PCL had Microsoft.Bcl.Build packages, and when I delated it from project packages (via Xamarin Studio) that fix an issue.

Although I fix my issue, I’m not understanding how packages could block functionality of the other, so if somebody know an answer for that I would appreciate a comment:)

Thanks

Marek Loose
  • 1,115
  • 13
  • 17
0

Is your shared project a Shared Project or a PCL?

If it is a PCL, you also need to add the Realm NuGet to the PCL.

Andy Dent
  • 17,578
  • 6
  • 88
  • 115
  • sorry for slow reply. What I meant is PCL not share project (I edited my question), however I already had Realm NuGet added in it. Finally I resolved this issue and answered my questions if you would be interested. Thanks – Marek Loose Jul 06 '16 at 08:54