永久删除机器范围的包源 [英] Permanently remove machine-wide package source

查看:13
本文介绍了永久删除机器范围的包源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近从我的机器上卸载了 Service Fabric 及其 SDK.然而,它留下了一个机器范围的包源:

I've recently uninstalled Service Fabric and its SDK from my machine. However, it has left behind a machine-wide package source:

微软 Azure Service Fabric SDK
C:\Program Files\Microsoft SDKs\Service Fabric\packages

Microsoft Azure Service Fabric SDK
C:\Program Files\Microsoft SDKs\Service Fabric\packages

此文件夹已不存在.它导致我的构建失败.取消选中此选项作为可用源似乎不会在会话之间持续存在.

This folder no longer exists. It is causing my build to fail. Unticking this option as an available source doesn't seem to persist between sessions.

如何永久删除此包源?

在 Visual Studio 选项中,此包源无法删除.我可以取消它,但这似乎不是持久的.

In the Visual Studio options, delete is not available for this package source. I can untick it, but that doesn't seem to be persistent.

我的 NuGet.config 也没有引用它.我在我的电脑上找不到另一个 NuGet.config.

My NuGet.config doesn't reference it either. I can't find another NuGet.config on my computer.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
    <add key="Microsoft Visual Studio Offline Packages" value="C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\" />
  </packageSources>
  <packageRestore>
    <add key="enabled" value="True" />
    <add key="automatic" value="True" />
  </packageRestore>
  <bindingRedirects>
    <add key="skip" value="False" />
  </bindingRedirects>
  <packageManagement>
    <add key="format" value="0" />
    <add key="disabled" value="False" />
  </packageManagement>
</configuration>

推荐答案

我发现删除这个文件(以管理员身份)解决了这个问题.Service Fabric 卸载程序一定遗漏了它.

I found that deleting this file (as an Administrator) solved the problem. It must have been missed by the Service Fabric uninstaller.

C:\Program Files (x86)\NuGet\Config\ServiceFabricSDK.config

C:\Program Files (x86)\NuGet\Config\ServiceFabricSDK.config

这篇关于永久删除机器范围的包源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆