extentreports-csharp
extentreports-csharp copied to clipboard
Getting Crash Error on Flush for Html Report
Code I'm using:
ExtentReports report = new();
ExtentHtmlReporter reporter = new("./temp");
report.AttachReporter(reporter);
var suiteNode = report.CreateTest("SmokeTests");
var testNode = suiteNode.CreateNode("Test Case");
var stepNode = testNode.CreateNode("Step 1");
stepNode.Info("Enter text 1234567890");
stepNode.Info("Press Enter");
stepNode.Info("Wait for 1 second");
testNode.Info("Done");
testNode.Pass("Passed");
suiteNode.Pass("Passed");
report.Flush();
If I run it by itself in a simple net5.0 console app or nunit test project it works fine.
But when i bring it into my actual project the same lines of code throw this error when Flush runs.
Getting this error:
Expression of type 'CompiledRazorTemplates.Dynamic.RazorEngine_c0f4c169c96049869b66f099bf3cad0a' cannot be used for return type 'RazorEngine.Templating.ITemplate'
Project Version: net5.0 Extent Package Version: 4.1.0