Weavers not found due to case sensitivity, nuget restore
See original GitHub issueHere is our scenario:
- We are building a mobile application via VSTS on a mac
- We are using Fody, and the PropertyChanged weaver
- We found that Fody fails to find the weaver in a lower case package name scenario, outlined below
build output for the Fody MSBuild target:
Target FodyTarget:
Fody: Fody (version 1.29.4.0) Executing
Fody: ProjectDirectory: '/buildagent/_work/2/s/App/DeveloperModule/'.
Fody: AssemblyPath: '/buildagent/_work/2/s/App/DeveloperModule/obj/Release/DeveloperModule.dll'
Fody: Found path to weavers file '/buildagent/_work/2/s/App/DeveloperModule/FodyWeavers.xml'.
Fody: SolutionDirectory path is '/buildagent/_work/2/s/App/'
Fody: Finding weavers
Fody: Adding weaver dlls from '/buildagent/_work/2/s/App/Packages'.
Fody: Could not find packages dir from nuget config.
Fody: SolutionDirectoryPath: /buildagent/_work/2/s/App/
Fody: Adding weaver dlls from '/Users/buildagent/.nuget/packages/fody'.
Fody: SolutionDirectoryPath: /buildagent/_work/2/s/App/
Fody: Skipped scanning '/buildagent/_work/2/s/App/Tools' for weavers since it doesn't exist.
Fody: No Weaver project file found.
: error : Fody: Could not find a weaver named 'PropertyChanged'.
After some troubleshooting, we found the following path was problematic: /Users/buildagent/.nuget/packages/propertychanged.fody
This is the standard nuget package cache location for the build agent user.
When we renamed the package, using:
mv propertychanged.fody PropertyChanged.Fody the build began working.
Unfortunately, the lower case behavior appears to be base behavior in Nuget 3.5.0.1938, which is what our VSTS Step runs, for example:
2017-05-10T18:09:18.6094670Z ##[section]Starting: NuGet restore developer module
2017-05-10T18:09:18.6263120Z ==============================================================================
2017-05-10T18:09:18.6275690Z Task : NuGet Installer
2017-05-10T18:09:18.6288140Z Description : Installs or restores missing NuGet packages
2017-05-10T18:09:18.6300480Z Version : 0.2.31
2017-05-10T18:09:18.6312850Z Author : Microsoft Corporation
2017-05-10T18:09:18.6325370Z Help : [More Information](https://go.microsoft.com/fwlink/?LinkID=613747)
2017-05-10T18:09:18.6337990Z ==============================================================================
2017-05-10T18:09:19.1140180Z Detected NuGet version 3.5.0.1938 / 3.5.0
And we are hesitant to explore odd work-arounds like attempting to rename the folder after the fact on a set of shared build machines.
I would expect that locating the PropertyChanged weaver should not be case sensitive, as the ID is not treated as case sensitive by Nuget.
We use Fody heavily, and appreciate this excellent project. Thanks in advance for any assistance with this issue!
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (11 by maintainers)

Top Related StackOverflow Question
This is still an issue, Visual Studio 2017 on Windows 10 build 1709.
1>------ Build started: Project: UniflowPrinter, Configuration: Debug Any CPU ------ 1> Fody: Fody (version 3.0.3.0) Executing 1>MSBUILD : error : Fody: Could not find path to weavers file. Searched ‘C:\prosjekter\UniflowPrinter\FodyWeavers.xml’, ‘C:\prosjekter\UniflowPrinter\UniflowPrinter\FodyWeavers.xml’. 1> Fody: Finished Fody 0ms. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I just add as existing item from another project.and fixed my bug