You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ExtentReport.flush throwing exception : Expression of type 'CompiledRazorTemplates.Dynamic.RazorEngine_b908e9946cfc452ba0c2ee97237ad0cf' cannot be used for return type 'RazorEngine.Templating.ITemplate
#169
It was all working fine until .net6 and today when I upgraded my .net framework to .net 7
Extent.flush started throwing this issue
Exception Message :
`Expression of type 'CompiledRazorTemplates.Dynamic.RazorEngine_b9f52b03346147f1a44ad78178672b4f' cannot be used for return type 'RazorEngine.Templating.ITemplate'
`
Stack Trace :
at System.Linq.Expressions.Expression.ValidateLambdaArgs(Type delegateType, Expression& body, ReadOnlyCollection`1 parameters, String paramName)
at System.Linq.Expressions.Expression.Lambda[TDelegate](Expression body, String name, Boolean tailCall, IEnumerable`1 parameters)
at System.Linq.Expressions.Expression.Lambda[TDelegate](Expression body, Boolean tailCall, IEnumerable`1 parameters)
at RazorEngine.Templating.TypeLoader.GetConstructorInternal(Type type)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at RazorEngine.Templating.TypeLoader.GetConstructor(Type type)
at RazorEngine.Templating.TypeLoader.CreateInstance(Type type)
at RazorEngine.Templating.DefaultActivator.CreateInstance(InstanceContext context)
at RazorEngine.Templating.RazorEngineCore.CreateTemplate(ICompiledTemplate template, Object model, DynamicViewBag viewbag)
at RazorEngine.Templating.RazorEngineCore.<RunTemplate>d__12.MoveNext()
at RazorEngine.Templating.RazorEngineService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
at RazorEngine.Templating.DynamicWrapperService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
at RazorEngine.Templating.RazorEngineServiceExtensions.RunCompile(IRazorEngineService service, String name, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
at RazorEngine.Templating.RazorEngineServiceExtensions.RunCompile(IRazorEngineService service, String name, Type modelType, Object model, DynamicViewBag viewBag)
at AventStack.ExtentReports.Reporter.ExtentHtmlReporter.Flush(ReportAggregates reportAggregates)
at AventStack.ExtentReports.Core.ExtentObservable.<>c__DisplayClass59_0.<NotifyReporters>b__0(IExtentReporter x)
at System.Collections.Generic.List`1.ForEach(Action`1 action)
at AventStack.ExtentReports.Core.ExtentObservable.NotifyReporters()
at AventStack.ExtentReports.Core.ExtentObservable.Flush()
at AventStack.ExtentReports.ExtentReports.Flush()
at Everlight.UI.Test.Framework.Helpers.ReportHelper.Close()
at ClinicalFeedback.Ui.AutoTests.Tests.TestCases.TestOneTimeSetUp.OneTimeTearDown() in C:\Users\mmaheshwari\source\repos\clinicalfeedback.ui.autotests\ClinicalFeedback.AutoTests.Ui.Tests\TestCases\TestOneTimeSetUp.cs:line 71
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
The text was updated successfully, but these errors were encountered:
It was all working fine until .net6 and today when I upgraded my .net framework to .net 7
Extent.flush started throwing this issue
Exception Message :
The text was updated successfully, but these errors were encountered: