Selenium 2 WebDriver 的 NuGet 包无法安装在 Visual Studio 2010 中
我正在尝试在 Windows 7 上本地启动并运行 Selenium 2 WebDriver。由于某种原因,我无法安装从此处下载的 NuGet 包:
http://www.nuget.org/packages/Selenium.WebDriver/2.17.0
不确定我做错了什么。
Visual Studio 2010 >工具>库包管理器>包管理器控制台
PM> Get-Package -ListAvailable -Filter DotNetZip
Id Version Description/Release Notes
-- ------- -------------------------
DotNetZip 1.9.1.8 DotNetZip is an easy-to-use, FAST, FREE class library and toolset for manipulating zip files or folders.
DotNetZip.Reduced 1.9.1.8 DotNetZip is an easy-to-use, FAST, FREE class library and toolset for manipulating zip files or folders.
PM> Install-Package DotNetZip
Install-Package : The current environment doesn't have a solution open.
At line:1 char:16
+ Install-Package <<<< DotNetZip
+ CategoryInfo : InvalidOperation: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetNoActiveSolution,NuGet.PowerShell.Commands.InstallPackageCommand
I'm trying to get Selenium 2 WebDriver up and running locally on Windows 7. For some reason I am unable to install my NuGet packages I downloaded from here:
http://www.nuget.org/packages/Selenium.WebDriver/2.17.0
Not sure what I'm doing wrong.
Visual Studio 2010 > Tools > Library Package Manager > Package Manager Console
PM> Get-Package -ListAvailable -Filter DotNetZip
Id Version Description/Release Notes
-- ------- -------------------------
DotNetZip 1.9.1.8 DotNetZip is an easy-to-use, FAST, FREE class library and toolset for manipulating zip files or folders.
DotNetZip.Reduced 1.9.1.8 DotNetZip is an easy-to-use, FAST, FREE class library and toolset for manipulating zip files or folders.
PM> Install-Package DotNetZip
Install-Package : The current environment doesn't have a solution open.
At line:1 char:16
+ Install-Package <<<< DotNetZip
+ CategoryInfo : InvalidOperation: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetNoActiveSolution,NuGet.PowerShell.Commands.InstallPackageCommand
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
尝试在按照消息运行安装时打开解决方案。
Try having a solution open when running install as per the message.
起初,它的 NuGet 安装已损坏。当我尝试卸载 NuGet 时,它给出了一个错误:“当该文件已存在时无法创建该文件”。我必须关闭 Visual Studio 2010 并进入文件夹“C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft Corporation”并从那里显式删除扩展。然后重新安装“NuGet.Tools.vsix”。
然后我必须确保在 Visual Studio 2010 中打开了一个解决方案。这解决了问题。
At first, it had a corrupted NuGet install. When I tried uninstalling NuGet, it gave me an error that said, "cannot create a file when that file already exists". I had to close Visual Studio 2010 and go into folder "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft Corporation" and delete the extension explicitly from there. Then re-install "NuGet.Tools.vsix".
Then I had to make sure I had a solution open in Visual Studio 2010. That solved it.
我也有同样的问题。
尝试去...
Visual Studio 2010 >工具>库包管理器> 相反,管理 Nuget 包
,然后搜索 selenium。
这对我有用。如果您没有“管理 Nuget 包”选项。尝试卸载然后重新安装 nuget 包管理器。我注意到我必须在某些机器上执行此操作。
I had the same problem.
Try going to...
Visual Studio 2010 > Tools > Library Package Manager > Manage Nuget Packages
instead, then search on selenium.
It worked for me. If you dont have the Manage Nuget Packages option. Try uninstalling then reinstalling the nuget package manager. I noticed I had to do this on some machines.
尝试在安装 Nuget 包之前保存您的解决方案
Try saving your solution before installing Nuget packages