FB Nuget Restore fails with latest VS 2019 16.5.0

I get this error:

The project file could not be loaded. The file or assembly “Microsoft.Build.Framework, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a” or a dependency was not found.


Hi Martin

The nuget restore action just calls the nuget command line so that would be where the error message is coming from. Are you able to run nuget from the command line?

I hate to say it, but did you try rebooting? I have had issues after installing VS updates that resolved after rebooting (even though the installer didn’t request one).

Hi Vincent,
turns out my nuget.exe was outdated (was 4.3). After manually updating to 5.4 everything is running again.
An alternative approach is running

msbuild -t:restore

which would not require nuget.exe.