首页 > 解决方案 > Webdriver Driver Mananger 2.7.0 没有从 Nuget 与 .Net 框架 4.5 安装

问题描述

当我尝试从 Nuget 包管理器安装引用时,我想在我的代码中使用 WebDriverManager,但出现错误。
我尝试过更新和降级 .Net 框架。
我们可以将 WebDriverManager 2.7.0 与 .Net 框架 4.5 一起使用吗?

看到的错误消息是:

Could not install package 'WebDriverManager 2.7.0'. You are trying to install this package into a project that targets '.NETFramework, Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.  

标签: c#selenium-webdrivernunitnunit-consolewebdriver-manager

解决方案


我知道这篇文章很旧,但我今天遇到了同样的问题并且能够弄清楚。您需要安装 2.2.7 版本。WebDriverMangaer 2.2.8 及更高版本需要 .Net Standard 2.0,它仅与 .NET Framework 4.6.1 及更高版本兼容。


推荐阅读