Visual Studio 2013 由于 nuget 引用缺失

Visual Studio 2013 References missing due to nuget

我今天启动了 VS 2013,但所有引用都丢失了,配置文件看起来没问题,但在 VS 中没有设置路径。

我尝试使用 pkgmanager nuget 恢复它,但仍然没有 dll 的 PATH 条目。

我在 this blog by following the instructions found here 上使用示例文件找到了解决方案。

  1. 关闭Visual Studio
  2. 使用 TFS:
    • 从解决方案的 .nuget 文件夹中删除 NuGet.exe 和 NuGet.targets 文件。确保文件本身也已从解决方案工作区中删除。
    • 保留 NuGet.Config 文件以继续绕过将包添加到源代码管理。
    • 编辑解决方案中的每个项目文件(例如 .csproj、.vbproj)并删除对 NuGet.targets 文件的所有引用
  3. 没有 TFS:
    • 从您的解决方案中删除 .nuget 文件夹。确保文件夹本身也已从解决方案工作区中删除。
    • 编辑解决方案中的每个项目文件(例如 .csproj、.vbproj)并删除对 NuGet.targets 文件的所有引用。