0

I'm making app with using Xamarin.forms. (PCL Project)

Today, I added new three solution packages named SVG.Forms.Plugin.Abstractions, SVG.Forms.Plugin.iOS, SVG.Forms.Plugin.Android on workspace that downloaded from github.

I have used realm for Xamarin. But After I added new packages, "Realms.RealmException has been thrown". Message is "Fody not properly installed. allbX.Baby is a RealmObject but has not been woven."

Is it Fody's problem or Realm's or new packages'(SGV Control)? And could you let me know how to solve it?

Bright Lee
  • 2,306
  • 2
  • 27
  • 55
  • I tried to add again from nuGet at this time. It works fine. What's difference between adding package from nuGet and from adding existing solution on workspace? – Bright Lee Jul 16 '16 at 10:56
  • When you add existing projects (not solution as you cannot add solution), you are responsible to make sure that they indeed can compile, while you don't need to worry the same if you are using NuGet packages. So if your case, make sure you study the documents in those GitHub repos and compile them correctly before moving on. – Lex Li Jul 16 '16 at 11:31
  • @LexLi Thanks Lex, And Sorry for late reply. That could be one of the reason. But I was sure they can compile. – Bright Lee Jul 19 '16 at 20:43

1 Answers1

0

Better Answer The check which is delivering that message is because Fody is not running.

So, they may have a RealmObject in their component but Fody doesn't get run building in your solution so weaving doesn't occur.

The easiest fix is to just use NuGet to add Fody to your main application project. That should install it in the right place for the solution.

Background NuGet manages dependencies so if a package relies on Realm, it will go on in turn and install Realm. Realm itself relies on Fody, for example, so will in turn trigger a Fody installation.

You can manually install Realm but it is a little fiddly, having to add a couple of lines to your csproj to specify imports. We have chosen to only document installation via NuGet at this stage.

If you want to manually add Realm to another solution without using NuGet, I suggest you take a new clean solution, save a copy, and diff with the changes made to that solution by adding Realm via NuGet. You will then see the lines to copy into your existing solution.

Andy Dent
  • 17,578
  • 6
  • 88
  • 115