question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Weavers not found due to case sensitivity, nuget restore

See original GitHub issue

Here 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:closed
  • Created 6 years ago
  • Comments:14 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
BjornerJFcommented, Apr 17, 2018

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 ==========

0reactions
RezaAshenacommented, Oct 3, 2018

I just add as existing item from another project.and fixed my bug

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error Fody: No weavers found. Add the desired ...
In my case, FodyWeavers.xml is already exists because the PropertyChanged.Fody library was installed. if this file exists, just add <Costura /> ...
Read more >
Troubleshooting NuGet Package Restore in Visual Studio
This error occurs when you attempt to build a project that contains references to one or more NuGet packages, but those packages are...
Read more >
NuGet package with uppercase characters in prerelease ...
I think the issues comes from the version string matching being case sensitive. When requesting the package, nuget.exe changes the version to ...
Read more >
weaver.wps_restapi.colander_extras — Weaver 4.30.0 documentation
Validator that ensures the given value matches one of the available choices, but allowing case-insensitive values. class weaver.wps_restapi.colander_extras.
Read more >
Decision Making under Deep Uncertainty: From Theory to Practice
... which gather all known facts together into a single package that, ... models are useful when no single model can be validated...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found