Could not load type 'Microsoft.Build.Framework.SdkReference' on project open in VS 2017 U1 (15.3)

后端 未结 3 1945
借酒劲吻你
借酒劲吻你 2020-12-10 04:41

After doing an (apparently successful) upgrade from VS 2017 15.1 to 15.3, I can no longer load any C# project (can\'t open existing, can\'t create new). All fail with this e

相关标签:
3条回答
  • 2020-12-10 05:21

    1.- Open Developer Command Prompt for VS2017 as Admin

    2.- Uninstall the Microsoft.Build.Framework from GAC (Global Assembly Cache)

    gacutil /u Microsoft.Build.Framework
    

    3.- Re-install the 15.1.0 version (correct path according to current VS2017 edition)

    gacutil /i "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Build.Framework.dll"
    

    Now the projects in solutions should load properly.

    0 讨论(0)
  • 2020-12-10 05:23

    Use an adminstrator "Developer Command Prompt for VS 2017" to run

    gacutil /u "Microsoft.Build.Framework, Version=15.1"
    

    Please do not reinstall another version to the GAC. MSBuild should not be in the GAC, and installing it there will cause problems the next time Visual Studio updates MSBuild, because the file from the GAC gets preferred over the updated version delivered with Visual Studio.

    0 讨论(0)
  • 2020-12-10 05:37

    I ran into a very similar issue after installing Visual Studio 2015 on a machine that already had Visual Studio 2017.

    Re-installing Microsoft.Build.Framework into the GAC solve my issue.

    0 讨论(0)
提交回复
热议问题