c# - 无法在 vs 2017 中添加任何 nuget 包

标签 c# .net nuget-package .net-framework-version visual-studio-2017

我正在尝试在 vs 2017 中添加 nuget 包 prism.core,目标框架是 4.6.1,它给出了这个错误

Severity Code Description Project File Line Suppression State Error Failed to add reference to 'Microsoft.Practices.ServiceLocation'. Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)

尝试安装 newtonsoft.json 包,出现此错误

Severity Code Description Project File Line Suppression State Error Failed to add reference to 'Newtonsoft.Json'. Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)) 0

无法安装任何 nuget 包?这与 vs 2017 有关系吗?

enter image description here

最佳答案

After repairing the visual studio, it worked.

关于c# - 无法在 vs 2017 中添加任何 nuget 包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44318649/

相关文章:

c# - 如何在 monotouch Xamarin 中动态调整按钮和标签的大小

c# - 我可以在 nuget 包中有部分类吗?

c# - 如何在 TreeView 中显示目录?

c# - 如何从 Silverlight Out-of-Browser 打开弹出窗口?

c# - 使用反射发射时为 "Bad label content in ILGenerator"

.net - 在 C# 中的面板上拖放时移动控件

c# - Visual Studio 2017 中的 Nuget Pack 命令

nuget - 如何获取离线安装的所有 nuget 依赖项

c# - 组框标题颜色

c# - 在构造函数 c# 中设置程序集标题