You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

安装RestSharp后EF命令及项目运行报错:无法加载Microsoft.Build.Framework

安装RestSharp包后EF命令及项目运行报错问题

安装RestSharp包后,执行add-migration或update-database命令时失败,运行项目也出现相同错误,具体报错信息如下:

Could not load file or assembly 'Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.

已尝试以下解决方案,但均未解决问题:

  • 修改devenv.exe.config中的MSbuild路径
  • 将Microsoft.Build.Framework.dll添加到全局程序集缓存
  • 重启Visual Studio
  • 修复Visual Studio
  • 移除RestSharp包
  • 重新安装NuGet包
  • 删除*.csproj.user文件

使用环境:Visual Studio 2022 Enterprise(17.3.3)


内容的提问来源于stack exchange,提问作者Pablo

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.19 15:45:41