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
I have receiving the below error when I run my test. It is complaining about the TearDown FlushReport function:
TearDown : System.TypeLoadException : Could not load type 'Microsoft.AspNetCore.Razor.Language.RazorTemplateEngine' from assembly 'Microsoft.AspNetCore.Razor.Language, Version=6.0.33.0
I understand it may be caused by incompatible package versions but I am new to coding and don’t know how I know what is or isn’t compatible?
The RazorTemplateEngine class is not available from Microsoft.AspNetCore.Razor.Language version 3.1.0 and later versions, because it was removed in .NET Core 3.0. So, to make it compatible with ExtentReport, you need to use Microsoft.AspNetCore.Razor.Language version 2.2.0. It still contains the RazorTemplateEngine class.
I have receiving the below error when I run my test. It is complaining about the TearDown FlushReport function:
TearDown : System.TypeLoadException : Could not load type 'Microsoft.AspNetCore.Razor.Language.RazorTemplateEngine' from assembly 'Microsoft.AspNetCore.Razor.Language, Version=6.0.33.0
I understand it may be caused by incompatible package versions but I am new to coding and don’t know how I know what is or isn’t compatible?
These are my nuget package versions:
And my code (ExtentReport.cs):
And the test file TearDown that utilises this file, this is where the error is occurring:
The text was updated successfully, but these errors were encountered: