尝试使用 NuGet 安装 Selenium.WebDriver 时出错
我正在尝试使用 NuGet 在我的项目上设置 Selenium WebDriver 2.5.1。
我尝试通过工具 -> 安装在 Visual Studio 中管理 NuGet 包... 并收到错误。
我尝试在 NuGet 控制台内调用命令,如上面的链接所示:
Install-Package Selenium.WebDriver
并且得到相同的错误,即:
Attempting to resolve dependency 'Newtonsoft.Json (≥ 4.0.2)'.
Install-Package : Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
At line:1 char:16
+ Install-Package <<<< Selenium.WebDriver
+ CategoryInfo : NotSpecified: (:) [Install-Package], IOException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
这是 Selenium NuGet 包本身的错误吗?有谁知道如何克服这个问题(当然除了不安装 NuGet 包并恢复到手动设置)?
谢谢。
I'm trying to setup Selenium WebDriver 2.5.1 on my project using NuGet.
I tried installing via Tools -> Manage NuGet Packages... in Visual Studio and got an error.
I tried invoking the command inside the NuGet console as shown in the link above:
Install-Package Selenium.WebDriver
and I get the same error, which is:
Attempting to resolve dependency 'Newtonsoft.Json (≥ 4.0.2)'.
Install-Package : Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
At line:1 char:16
+ Install-Package <<<< Selenium.WebDriver
+ CategoryInfo : NotSpecified: (:) [Install-Package], IOException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
Is it an error of the Selenium NuGet package itself? Does anyone know how to overcome this (except not installing NuGet package and revert to manual setup of course)?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
错误消息“现有连接被远程主机强制关闭。”表明与 NuGet 存储库服务器的连接正在终止,而不是 Selenium NuGet 包中存在错误。
我会尝试安装 Selenium.WebDriver 2.5.1 单独依赖的包:
或者使用 NuGet Package Explorer 查看是否可以下载这些包。但是,如果您的互联网连接出现问题,那么这两种方法都可能不起作用,您将必须恢复到手动设置或让某人下载软件包,将它们发送给您,然后您可以在磁盘上设置本地 NuGet 存储库并使用它代替在线 NuGet 存储库。
The error message "An existing connection was forcibly closed by the remote host." suggests that the connection to the NuGet repository server is being terminated rather than there being an error in the Selenium NuGet package.
I would try installing the packages Selenium.WebDriver 2.5.1 depends on individually:
Or use NuGet Package Explorer to see if you can download the packages. However if there are problems with your internet connection then both of these may not work and you will have to revert to the manual setup or get somebody to download the packages, send them to you and then you can set up a local NuGet repository on disk and use that instead of the online NuGet repository.