Xamarin issues with Fody.WeavingTask and SolutionDir
Asked Answered
E

3

21

I have been trying to use Realm in my Xamarin android proyect, one of it's dependencie is Fody, each time i try to run my app it shows the following error: error MSB4044: The "Fody.WeavingTask" task was not given a value for the required parameter "SolutionDir".

I have been looking for a fix, but can't find it, do you know how to give it a value? where is it?

For the realm nugget package i already created the FodyWeavers.xml

Egbert answered 8/5, 2018 at 3:29 Comment(1)
Are you building via VSTS, some other CI server, cmd-line or directly in Visual Studio (Windows or Mac)?Matteson
E
62

uff, that's a bug you just need to close the solution and open it again.

Egbert answered 15/5, 2018 at 23:4 Comment(5)
These are those kinds of Xamarin issues that makes me want to break my keyboard in half. Thank you.Capriole
I agree this is very frustrating but this may not be Xamarin-specific. I experienced this with a .NET console application.Reckford
I got bit by this too and the solution wasn't obvious. Wonder if this is reproducible... Would be great to be able to send a bug report to whoever could fix it.Twilley
This is specific to Fody, not Xamarin, I got a similar error Fody.weavingtask task was not given a value for the required parameter IntermediateDir and restarting the solution fixes the issueSagittarius
In my case, it was "IntermediateDir" instead of "SolutionDir" and re-opening the solution did fix the problem.Saucer
P
7

Haahh.., I resolved the same issue by just restarting my solution. ;-)

Plains answered 15/10, 2018 at 14:10 Comment(0)
H
1

I am not sure about the error you are getting. Please check for the following points:

1.The FodyWeavers.xml should be in all projects in your solution and looks like this

 <?xml version="1.0" encoding="utf-8"?>
<Weavers>
   <RealmWeaver/>
</Weavers>

2.As of today the latest realm package ver 3.0.0 is compatible with Fody ver 2.5.0.

Hooge answered 8/5, 2018 at 10:49 Comment(1)
I created the FodyWeavers for all projects, my problem was bug.Egbert

© 2022 - 2024 — McMap. All rights reserved.