Could not load file or assembly ‘Microsoft.Build.Framework'(VS 2017)

I believe I had the same issue as you did. I didn’t save the whole error message, but my error message was

Could not load file or assembly ‘Microsoft.Build.Framework,
Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or
one of its dependencies. The system cannot find the file specified.

I am using Visual Studio 2017 and was trying to do Update-Database after Add-Migration.

To resolve the issue I closed Visual Studio and re-opened it, then re-ran Update-Database again.

This may or may not resolve your issue, but I thought I’d post just in case it would help.

Leave a Comment