extent-framework / extentreports-csharp

Extent Reporting Library, .NET
http://extentreports.com
Apache License 2.0
49 stars 40 forks source link

Another crash at Flush() #171

Open Jens-G opened 1 year ago

Jens-G commented 1 year ago

System.MissingMethodException : Method not found: 'System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.Convert(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, System.Type, System.Type)'.

anshooarora commented 10 months ago

Can you give it a try with the latest beta and revert back if you continue to face this issue?

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

Please note: with version 5, ExtentHtmlReporter is deprecated and ExtentSparkReporter is the replacement. So the above code will change slightly:

using AventStack.ExtentReports;
using AventStack.ExtentReports.Reporter;

var extent = new ExtentReports();
var htmlReporter = new ExtentSparkReporter("index.html");
extent.AttachReporter(htmlReporter);
extent.CreateTest("MyFirstTest").Pass("details");
extent.Flush();