无法加载文件或程序集“ WebDriver,版本= 2.35.0.0 ...” [英] Could not load file or assembly 'WebDriver, Version=2.35.0.0 ...'
问题描述
我遵循了
但是我下载了最新版本:
But I had download the lastest version of:
WebDriver.ChromeDriver.win32 2.4 .0
http://www.nuget.org/packages/WebDriver。 ChromeDriver.win32 /
WebDriver.ChromeDriver.win32 2.4.0 http://www.nuget.org/packages/WebDriver.ChromeDriver.win32/
selenium-dotnet-strongnamed-2.37.0
https://code.google.com/p/selenium/downloads/list
selenium-dotnet-strongnamed-2.37.0 https://code.google.com/p/selenium/downloads/list
然后我将它们安装在64位计算机上,但是当我尝试运行自动化测试时,Visual Studio 2013提出了下一个问题:
then I installed those in my machine of 64bits but the Visual Studio 2013 present the next problem when I try to run automated test:
System.IO.FileNotFoundException: Could not load file or assembly
'WebDriver, Version=2.35.0.0, Culture=neutral, PublicKeyToken=1c2bd1631853048f' or one of its dependencies. The system cannot find the file specified.WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
推荐答案
使用强命名(所谓的签名)程序集作为引用。 Microsoft跨浏览器工具绑定到对Selenium .NET绑定的特定版本的引用。在这种情况下,跨浏览器工具的版本直接引用2.35.0的.NET绑定。没有其他版本可以使用;您必须专门下载 NET绑定的版本。
You're running into the main problem with using strong-named (so-called "signed") assemblies as references. The Microsoft cross-browser tools are bound to a reference to a specific version of the Selenium .NET bindings. In this case, the version of the cross-browser tools directly reference 2.35.0 of the .NET bindings. No other version will do; you'll have to download specifically that version of the .NET bindings.
这篇关于无法加载文件或程序集“ WebDriver,版本= 2.35.0.0 ...”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!