57

Visual Studio 2017 let me know there was an upgrade to Fody version 5 this morning. I accepted and did a NuGet package update of both Fody and PropertyChanged.Fody.

Now, my project/solution will no longer build.

The error is:

"Fody is only supported on MSBuild 16 and above. Current version: 15."

I tried uninstalling, shutting down VS, and reinstalling to no avail.

Charlie Peppler
  • 689
  • 1
  • 5
  • 6

3 Answers3

94

Please downgrade Fody to version 4.2.1.

DrewM
  • 43
  • 4
Colonel Software
  • 1,401
  • 1
  • 11
  • 16
  • 2
    What is the last version of Fody supporting Visual Studio 2017? – ajr May 03 '19 at 10:34
  • 14
    In my case I had to downgrade PropertyChanged.Fody nuget from 3.0.1 to 2.6.1 – Xusan Jun 06 '19 at 09:05
  • If you use ReactiveUI, downgrade ReactiveUI.Fody to version 9.13.1. If you have VS17 15.9 or later, you can use this line in your csproj to lock the version: `` – Simone Aug 20 '19 at 07:15
  • 2
    Although not as relevant, I came here because I was using Costura.Fody in a new csproj application. Version 4.1.0 automatically uses Fody 6, but downgrading Costura.Fody to 3.3.3 worked for me. – Jeremy Nov 18 '19 at 14:01
  • 4
    If you're using Costura.Fody the last version compatible with 4.2.1 is 3.3.3 – xanth Nov 26 '19 at 04:04
6

For what it's worth - I ran into the same situation. A colleague added Fody with no other reason than to reduce the number of files created upon building.

Rather than deal with downgrading plugin versions or upgrading VS2017 to VS2019, I removed Fody from the project (as it had no real added value in the project).

Daniël Camps
  • 1,737
  • 1
  • 22
  • 33
  • 17
    I disagree with who-ever down-voted this: if you have a standard build environment, then if someone breaks the build by installing something that requires a VS upgrade, then the correct thing IS to remove the offending package... (until your standard build environment can be upgraded, of course). – philu Aug 28 '19 at 02:13
  • 2
    yep. "to reduce the number of files created upon building" is not enough of a reason to take a dependency like Fody – Simon Oct 13 '19 at 22:35
  • 2
    All the time we spend trying to fix problems with build/Devops because Fody is much much times superior to time supposed saved in development. I don't recommend to use it. – Vinicios Torres Jan 22 '20 at 16:13
  • another reason: It is expected that all developers become **Patrons** – Lei Yang Aug 10 '20 at 06:39
4

Upgrade to Visual Studio 2019 https://visualstudio.microsoft.com/downloads/

Simon
  • 33,714
  • 21
  • 133
  • 202