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

Unable to add any nuget package in vs 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 有关系吗?

After repairing the visual studio, it worked.