安装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
相关产品推荐
相关产品推荐

