Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Extent Report XML Serializer issue #193

Open
Divya23490 opened this issue Oct 16, 2023 · 3 comments
Open

Getting Extent Report XML Serializer issue #193

Divya23490 opened this issue Oct 16, 2023 · 3 comments
Labels
question Further information is requested

Comments

@Divya23490
Copy link

I have updated the extent report package to 5.0.1 and updated the extent-config.xml with the latest for c# project but still I am getting this issue. I am getting error at LoadXMLConfig method. I debugged the code and checked the extendConfigPath is correct. Please suggest the fix.
var htmlReporter = new ExtentSparkReporter(Path.Combine(resultPath, "TestAutomation_Appium.html"));
htmlReporter.LoadXMLConfig(extendConfigPath);

Below is the error that I get while debugging the code:-
System.IO.FileNotFoundException: Could not load the file 'ExtentReports.XmlSerializers'.
File name: 'ExtentReports.XmlSerializers'
at System.AppDomain.Load (System.Reflection.AssemblyName assemblyRef, System.Security.Policy.Evidence assemblySecurity) [0x00073] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System/AppDomain.cs:758
at (wrapper remoting-invoke-with-check) System.AppDomain.Load(System.Reflection.AssemblyName,System.Security.Policy.Evidence)
at System.AppDomain.Load (System.Reflection.AssemblyName assemblyRef) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System/AppDomain.cs:724
at (wrapper remoting-invoke-with-check) System.AppDomain.Load(System.Reflection.AssemblyName)
at System.Reflection.Assembly.Load (System.Reflection.AssemblyName assemblyRef) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.Reflection/Assembly.cs:440
at System.Xml.Serialization.TempAssembly.LoadGeneratedAssembly (System.Type type, System.String defaultNamespace, System.Xml.Serialization.XmlSerializerImplementation& contract) [0x0006c] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/System.Xml/System/Xml/Serialization/Compilation.cs:177

@anshooarora
Copy link
Member

Are you using the config file from https://github.com/extent-framework/extentreports-csharp/tree/master/config? The config file for C# and Java implementations are different.

@Divya23490
Copy link
Author

Yes, I am using the sparkconfig.xml which is added by you just few days back. After changing the file, still I am getting the same issue. I have created net framework 4.7.1 specflow project on rider. Added Extent Reports 5.0.1 nuget package.

@anshooarora
Copy link
Member

I'm unable to reproduce this error with the current config file. Can you create a project or snippet reproducing this error with code + config and share it? It will better help me understand what's causing this.

@anshooarora anshooarora added the question Further information is requested label Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants