Error trying to install Selenium.WebDriver with 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
+ CategoryIn开发者_开发百科fo : 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.
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:
- Newtonsoft.Json 4.0.2
- DotNetZip 1.9.1.8
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.
精彩评论