0

I have just taken over a C# application, which seems to use some Fody library (whatever that means). First I had some problems that the Fody things were not working, not recognised, ..., and I've removed the Fody package and the PropertyChanged libraries from my PC and re-installed it again, but now I have two other error messages:

  • 3>C:\My_App_Directory\packages\Fody.6.6.4\build\Fody.targets(50,9): error MSB4064: The "DelaySign" parameter is not supported by the "Fody.WeavingTask" task loaded from assembly: Fody, Version=4.2.1.0, Culture=neutral, PublicKeyToken=1ca091877d12ca03 from the path: C:\My_App_Directory\packages\Fody.4.2.1\netclassictask\Fody.dll. Verify that the parameter exists on the task, the <UsingTask> points to the correct assembly, and it is a settable public instance property.
  • 3>C:\My_App_Directory\packages\Fody.6.6.4\build\Fody.targets(40,5): error MSB4063: The "Fody.WeavingTask" task could not be initialized with its input parameters.

For your information, this is what my application "looks" like:

The "packages.config" file:

<packages>
  ...
  <package id="Fody" version="6.6.4" targetFramework="net461" developmentDependency="true" />
  ...
  <package id="PropertyChanged.Fody" version="4.1.0" targetFramework="net461" />
  ...

(Previously there were older versions.)

The "FodyWeavers.xml" file:

<?xml version="1.0" encoding="utf-8"?>
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"/>

Previously this contained a <PropertyChanged/> tag.
Putting that tag back results in the already mentions error messages.

I have understood that this "Fody" stuff makes it possible for my GUI-based event to react on "PropertyChanged" events, but why does it mess up my build process and how can I build my application?

Thanks in advance

Dominique
  • 16,450
  • 15
  • 56
  • 112
  • _"but why does it mess up my build process ... "_ - Fody is a IL-weaving library, i.e. it modifies the compiled dll's IL code according to some rules (during build pipeline). For example `PropertyChanged.Fody` will modify the IL so the properties support event change notification (you can implement this by hand but this will require more typing/copypasting). – Guru Stron Apr 11 '23 at 15:07
  • Based on the error message - verify that all projects in the solution have the same version of library, then try cleaning solution and manually deleting bin/obj folders and restarting VS. – Guru Stron Apr 11 '23 at 15:10
  • Did you reinstall the same version? I see the package.config file which is an old format. You could try migrating to `PackageReference` format and see if that helps. – Hank Apr 11 '23 at 15:32
  • Nuget restore has installed a newer version of Fody: before it was "4.2.1", now it is "6.6.4". Same with "PropertyChanged.Fody": first version was "2.6.1", now it is "4.1.0". – Dominique Apr 12 '23 at 06:15
  • @Hank: what do you mean by `PackageReference` format? – Dominique Apr 12 '23 at 06:16
  • Revert to the previous version if you can. Otherwise, you need to clean out your temporary files in the project directory because the build system is trying to load the `Fody.Weaving` tasks provided by the v6 NuGet package but for some reason is trying to use that task from the v4 DLL as seen from the error message. – Hank Apr 13 '23 at 19:20
  • How to migrate to the PackageReference format from packages.config: https://learn.microsoft.com/en-us/nuget/consume-packages/migrate-packages-config-to-package-reference – Hank Apr 13 '23 at 19:21

1 Answers1

0

change your project to not use DelaySign

Simon
  • 33,714
  • 21
  • 133
  • 202