【发布时间】:2019-06-16 21:06:44
【问题描述】:
在构建从工作存储库克隆的解决方案时,我收到以下错误。事实上,url https://tc.xxx.yyy.intra/httpAuth/app/nuget/v1/FeedService.svc/ 已正确添加为 NuGet 中的包源(根据 Visual Studio)。
https://tc.xxx.yyy.intra/httpAuth/app/nuget/v1/FeedService.svc/: Unable to load the service index for source https://tc.xxx.yyy.intra/httpAuth/app/nuget/v1/FeedService.svc/.
An error occurred while sending the request.
The remote name could not be resolved: 'tc.xxx.yyy.intra'
https://api.nuget.org/v3/index.json: Package 'ServiceLocatorAnalyzer.1.0.6533.24990' is not found on source 'https://api.nuget.org/v3/index.json'.
https://www.nuget.org/api/v2/: Package 'ServiceLocatorAnalyzer.1.0.6533.24990' is not found on source 'https://www.nuget.org/api/v2/'.
. Please see Error List window for detailed warnings and errors.
但是,在检查我的 AppData 文件夹中的 NuGet.config 文件(如下)后,我可以看到其中只添加了 1 个 NuGet 包源,而根据 VS 有 5 个:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>
这是预期的行为吗?
我还删除了 NuGet.config 文件;像这里提到的VS2015 nuget package manager not finding packages 那样重新启动了我的VS,但它没有用。
知道我哪里出错了吗?
【问题讨论】: