包还原失败.回滚包更改
问题描述:
当我尝试在 VS2017 中为 asp.net core 安装任何 nuget 包时.它不断显示每个包的包恢复失败.正在回滚包更改".
When I am trying to install any nuget package in VS2017 for asp.net core. it is constantly showing "Package restore failed. Rolling back package changes" for each package.
答
您可以执行以下步骤:
- VS 工具
- 选项
- Nuget 包管理器
- 一般
- 清除所有 Nuget 缓存.
或
您需要将目标 .net core 1.1 更改为 2.0,如果您将 VS 2017 更新为最新版本(例如 VS 2017 15.3)
You need to change target .net core 1.1 to 2.0, and this is possible if you update your VS 2017 with the latest version(ex. VS 2017 15.3)