本文介绍了无法恢复包; Nuget证书无效,但重置后有时重新验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据下面的错误消息,我遇到了无法从Nuget恢复软件包的问题。


恢复NuGet软件包时出错:无法加载源https://api.nuget.org/v3/index.json的服务索引。

[nuget.org]无法加载源https的服务索引: //api.nuget.org/v3/index.json。

 发送请求时出错。

 基础连接已关闭:无法为SSL / TLS安全通道建立信任关系。

  根据验证程序,远程证书无效。

但是,如果我重置我的电脑,大多数这个问题神奇地消失了,我可以再次恢复包...一段时间。


对于一些背景信息,我遇到了另一个问题,试图建立一个C#项目Visual Studio 2017创建服务,该服务在我的本地帐户上运行。该项目是正确构建的,但由于我的帐户未通过域进行身份验证而导致服务未能启动
,因为其他服务的原因,"NetLogin",应该是启动时自动启用,已禁用,阻止我访问域名...但是,在我诊断出问题之前,由于这个"NetLogin"而导致问题是
服务,我'系统恢复'Windows。系统还原已损坏的Visual Studio,我重新安装它,重新安装后,许多Visual Studio扩展(包括NUnitAdapter3和Viasfora)都已损坏。
它们似乎已安装,但表现得好像没有安装。




解决方案

I've been experience an issue where I cannot restore packages from Nuget, as per the error message below.

Error occurred while restoring NuGet packages: Unable to load the service index for source https://api.nuget.org/v3/index.json.
[nuget.org] Unable to load the service index for source https://api.nuget.org/v3/index.json.
  An error occurred while sending the request.
  The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
  The remote certificate is invalid according to the validation procedure.

However, if I reset my PC, most of the time the issue magically goes away and I can restore packages again... for a time.

For a bit of background information, I was experiencing another issue attempting to build a C# project in Visual Studio 2017 that creates service and that service runs on my local account. The project was built correctly, but the service failed to start due to my account not authenticating with the domain due to the unreasons of another service, "NetLogin", which is supposed to be automatic on startup, was disabled and preventing my access to the domain... however, before I diagnosed the issue was due to this "NetLogin" service, I 'system restored' Windows. The system restore corrupted Visual Studio, to which I reinstalled it, and after reinstalling it, a number of Visual Studio extensions, including NUnitAdapter3 and Viasfora, became corrupt. They appeared installed but behaved as if they're not installed.


解决方案


这篇关于无法恢复包; Nuget证书无效,但重置后有时重新验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 02:04