extentreports-csharp icon indicating copy to clipboard operation
extentreports-csharp copied to clipboard

Extent Reports 5.0.0-beta2 error on Flush(); [C# / Selenium]

Open AuToTe5ter opened this issue 2 years ago • 6 comments

Message:  TearDown : System.TypeLoadException : Could not load type 'Microsoft.AspNetCore.Razor.Language.RazorTemplateEngine' from assembly 'Microsoft.AspNetCore.Razor.Language, Version=6.0.21.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.

AuToTe5ter avatar Sep 11 '23 15:09 AuToTe5ter

Can you share any additional details that can help me reproduce this?

  • OS
  • .NET version

anshooarora avatar Sep 11 '23 15:09 anshooarora

Also see this comment: https://github.com/extent-framework/extentreports-csharp/issues/173#issuecomment-1714163200

Please make sure to remove all other ExtentReports packages and update to the latest 5.0.0 from 5.0.0-beta2.

anshooarora avatar Sep 11 '23 16:09 anshooarora

@anshooarora OS = Windows 10 Enterprise (22H2) .Net Framework = 4.8

I have removed all previous versions from packages folder and can confirm version is 5.0.0-beta2

AuToTe5ter avatar Sep 12 '23 07:09 AuToTe5ter

Something is off with the version of Microsoft.AspNetCore.Razor.Language. Below are the versions of RazorEngine dependencies and it's supposed to be on 2.2.0 instead of 6.0.21.0.

image

anshooarora avatar Sep 13 '23 01:09 anshooarora

That didnt resolve issue downgrading to 2.2.0 (deprecated) version of Razor, however i have rolled by to a previous version of ExtentReports for now.

AuToTe5ter avatar Sep 14 '23 14:09 AuToTe5ter

This is quite worrisome though as an incorrect package dependency version was associated with your project. A future version may have backward incompatible changes which may cause such issues.

anshooarora avatar Sep 14 '23 16:09 anshooarora