Skip to content

Getting Extent Report XML Serializer issue #193

Open

Description

@Divya23490

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

Activity

  1. anshooarora commented on Oct 16, 2023

    @anshooarora
    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.

  2. Divya23490 commented on Oct 16, 2023

    @Divya23490
    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.

  3. anshooarora commented on Dec 8, 2023

    @anshooarora
    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions