我正在尝试在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
答案 0 :(得分:5)
根据消息运行安装时尝试打开解决方案。
Install-Package : The current environment doesn't have a solution open.
答案 1 :(得分:1)
起初,它的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中打开了解决方案。这解决了它。
答案 2 :(得分:0)
我遇到了同样的问题。
尝试去......
Visual Studio 2010&gt;工具&gt;库包管理器&gt;管理Nuget包
然后搜索selenium。
它对我有用。如果您没有Manage Nuget Packages选项。尝试卸载然后重新安装nuget包管理器。我注意到我必须在某些机器上这样做。
答案 3 :(得分:0)
在安装Nuget软件包之前尝试保存解决方案