简体   繁体   中英

Could not load type Microsoft.Build.Framework.IProjectElement in Visual Studio

Until recently everything worked fine, but I installed Visual Studio (15.6.3) Enterprise on top of my Visual Studio Community (15.5.X). This caused problems with existing projects (specifically with .shproj files), so I've slowly uninstalled and taken more and more drastic steps. Most recently I've:

  • Uninstalled Visual Studio Community and Enterprise
  • Deleted all files from AppData/Local/Microsoft/VisualStudio and AppData/Roaming/Microsoft/VisualStudio
  • Restarted the computer
  • Reinstalled Visual Studio 2017 (just community since that was working fine) with the following options checked:
    • .NET desktop development
    • Universal Windows Platform development
    • Mobile development with .NET

Now if I try to make a Console App (.NET Framework) , I get a popup after clicking the OK to create the new project:

Microsoft Visual Studio Could not load type 'Microsoft.Build.Framework.IProjectElement' from assembly 'Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

I'm unfortunately dead in the water until this is solved. Any help would be much appreciated as I'm about out of ideas.

The error message was slightly different (Microsoft.Build.Framework.IProjectElement vs Microsoft.Build.Framework.SdkReference) but the solution posted here solved my problem too:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM