Fody: Build fails if there are no weavers configured.
Hello.
It is very possible this is not a bug.
I have a Common project which will contain MethodDecorators for MethodDecorator weaver, so it had installed Fody nuget package in it as a dependency for MethodDecorator. But it will not use any weavers.
If I delete FodyWeavers.xml build fails with message:
MSBUILD : error : Fody: No configured weavers. It is possible you have not installed a weaver or have installed a fody weaver nuget into a project type that does not support install.ps1. You may need to add that weaver to FodyWeavers.xml manually. eg. <Weavers><WeaverName/></Weavers>. see https://github.com/Fody/Fody/wiki/SampleUsage [d:\Repos\eVote\Serve
r\Common\Common.csproj]
If I make it empty it’ll fail with similar message. If I specify MethodDecorator (as I have it installed) it fail build with message “No decorators, etc”.
I have a workaround: to remove Fody’s Tasks from project. But this is not good and can lead to problems while upgrading package.
My proposal is to have MsBuildProperty something like “SkipFody” to be able to write Fody-specific code without using it in place.
Regards, Anatoly.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 26 (10 by maintainers)
I had the same issue too. I solved it by adding
<Costura />in FodyWeavers.xml between the<Weavers>tags.I am experiencing the same issue, uninstalling and reinstalling several times did not fix the issue.
I had this same issue, and yes, I hit “Yes” on the overwrite prompt (I didn’t know better). For the record, I eventually solved it by adding
<PropertyChanged />between the<Weavers>tags.I experienced the same issue. Uninstalling and re-installing
PropertyChanged.FodyandFodyfixed the issue.@eberkund:
Surprisingly, if I’m uninstalling the package
Fodyand reinstalling it to the minimum version possible, the issue disappears.If your project is a .netstandard app the FodyWeavers.xml cannot be added automatically when the package is added. You’ll need to add it to the root of the project manually: