Selenium 2 WebDriver的NuGet包不会安装在Visual Studio 2010中

时间:2020-12-10 10:46:42

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:

我正在尝试在Windows 7上启动本地运行Selenium 2 WebDriver。出于某种原因,我无法安装从此处下载的NuGet软件包:

http://www.nuget.org/packages/Selenium.WebDriver/2.17.0

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

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

4 个解决方案

#1


5  

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

根据消息运行安装时尝试打开解决方案。

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

#2


1  

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".

起初,它的NuGet安装已损坏。当我尝试卸载NuGet时,它给了我一个错误,上面写着“当该文件已存在时无法创建文件”。我不得不关闭Visual Studio 2010并进入文件夹“C:\ Program Files(x86)\ Microsoft Visual Studio 10.0 \ Common7 \ IDE \ Extensions \ Microsoft Corporation”并从那里明确删除扩展名。然后重新安装“NuGet.Tools.vsix”。

Then I had to make sure I had a solution open in Visual Studio 2010. That solved it.

然后我必须确保我在Visual Studio 2010中打开了一个解决方案。这解决了它。

#3


0  

I had the same problem.

我有同样的问题。

Try going to...

试着去......

Visual Studio 2010 > Tools > Library Package Manager > Manage Nuget Packages

Visual Studio 2010>工具>库包管理器>管理Nuget包

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.

它对我有用。如果您没有Manage Nuget Packages选项。尝试卸载然后重新安装nuget包管理器。我注意到我必须在某些机器上这样做。

#4


0  

Try saving your solution before installing Nuget packages

在安装Nuget软件包之前尝试保存解决方案

#1


5  

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

根据消息运行安装时尝试打开解决方案。

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

#2


1  

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".

起初,它的NuGet安装已损坏。当我尝试卸载NuGet时,它给了我一个错误,上面写着“当该文件已存在时无法创建文件”。我不得不关闭Visual Studio 2010并进入文件夹“C:\ Program Files(x86)\ Microsoft Visual Studio 10.0 \ Common7 \ IDE \ Extensions \ Microsoft Corporation”并从那里明确删除扩展名。然后重新安装“NuGet.Tools.vsix”。

Then I had to make sure I had a solution open in Visual Studio 2010. That solved it.

然后我必须确保我在Visual Studio 2010中打开了一个解决方案。这解决了它。

#3


0  

I had the same problem.

我有同样的问题。

Try going to...

试着去......

Visual Studio 2010 > Tools > Library Package Manager > Manage Nuget Packages

Visual Studio 2010>工具>库包管理器>管理Nuget包

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.

它对我有用。如果您没有Manage Nuget Packages选项。尝试卸载然后重新安装nuget包管理器。我注意到我必须在某些机器上这样做。

#4


0  

Try saving your solution before installing Nuget packages

在安装Nuget软件包之前尝试保存解决方案