Selenium 2 WebDriver 的 NuGet 包无法安装在 Visual Studio 2010 中

发布于 2024-12-27 11:05:29 字数 1665 浏览 0 评论 0原文

我正在尝试在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

生死何惧 2025-01-03 11:05:29

尝试在按照消息运行安装时打开解决方案。

Install-Package : The current environment doesn't have a solution open.

Try having a solution open when running install as per the message.

Install-Package : The current environment doesn't have a solution open.
老娘不死你永远是小三 2025-01-03 11:05:29

起初,它的 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.

人生戏 2025-01-03 11:05:29

我也有同样的问题。

尝试去...

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.

你在我安 2025-01-03 11:05:29

尝试在安装 Nuget 包之前保存您的解决方案

Try saving your solution before installing Nuget packages

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文