简体   繁体   English

找不到 ExtentSparkReporter 类型或命名空间,为什么会这样? C#

[英]ExtentSparkReporter type or namespace cannot be found, why is this happening? C#

ExtentSprakReporter type or namespace not found I'm trying to generate extent reports for my project and ExtentV3HtmlReporter is deprecated.未找到 ExtentSprakReporter 类型或命名空间我正在尝试为我的项目生成范围报告,并且不推荐使用 ExtentV3HtmlReporter。 The extent website states that the replacement is ExtentSparkReporter.范围网站声明替换为 ExtentSparkReporter。 But, when I try to create a new instance of ExtentSparkReporter, the type or name space cannot be found.但是,当我尝试创建 ExtentSparkReporter 的新实例时,找不到类型或名称空间。 Not sure why it's not working.不知道为什么它不起作用。 I was not able to find anything online to solve my issue.我无法在网上找到任何东西来解决我的问题。

ExtentSparkReporter extentSpark = new ExtentSparkReporter();

Had this myself.我自己有这个。 To fix it, I had to upgrade ExtentReports to version 5.0.0要修复它,我必须将 ExtentReports 升级到 5.0.0 版

https://www.nuget.org/packages/ExtentReports/5.0.0-alpha6 https://www.nuget.org/packages/ExtentReports/5.0.0-alpha6

In Visual Studio open your terminal (View -> Terminal), go to your project directory and run:在 Visual Studio 中打开您的终端(查看 -> 终端),go 到您的项目目录并运行:

dotnet add package ExtentReports --version 5.0.0-alpha6 dotnet 添加 package ExtentReports --version 5.0.0-alpha6

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM