[英]C# adding reference problem
我將selenium引用添加到項目中並且正常工作但是當我單擊rebuild project時出現此錯誤:
Error 3 The type or namespace name 'Selenium' could not be found (are you
缺少using指令或程序集引用?)D:\\ PROJEKTI \\ crawler \\ WebCrawlerSuite \\ NCrawler \\ Net 4.0 \\ NCrawler.WinDemo \\ SeleniumHtmlDocumentProcessor.cs 6 7 NCrawler.WinDemo
這個警告:
Warning 2 The referenced assembly "ThoughtWorks.Selenium.Core" could not
解決因為它依賴於“System.Web,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a”,它不在當前目標框架“.NETFramework,Version = v4.0,Profile = Client”中。 請刪除不在目標框架中的程序集的引用或考慮重新定位項目。 NCrawler.WinDemo
什么可能是錯的?
我猜這是因為你的項目正在使用客戶端配置文件(框架版本中的“Profile = Client”)。 嘗試在項目屬性中將目標框架設置為普通的舊“.NET Framework 4”,看看是否可以解決問題。
在這種情況下,Selenium程序集引用System.Web,不允許客戶端配置文件框架。 有關詳細信息,請參閱http://msdn.microsoft.com/en-us/library/cc656912.aspx 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.