“Fody not properly installed” error exception. (Xamarin.forms)

ε祈祈猫儿з 提交于 2019-12-02 16:26:46

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/38409919/fody-not-properly-installed-error-exception-xamarin-forms

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!