C#C
C#3y ago
Miguel

Catastrophic failure while running xunit tests

When I run dotnet test in my xunit project all the tests pass, however, while the command is running this gets written to the output:
[xUnit.net 00:00:00.45]     [FATAL ERROR] System.ArgumentException
[xUnit.net 00:00:00.45] Catastrophic failure: System.ArgumentException : There is at least one object in this array that cannot be serialized (Parameter 'array')
[xUnit.net 00:00:00.45]     [FATAL ERROR] System.ArgumentException
[xUnit.net 00:00:00.45] Catastrophic failure: System.ArgumentException : There is at least one object in this array that cannot be serialized (Parameter 'array')
[xUnit.net 00:00:00.45]     [FATAL ERROR] System.ArgumentException
[xUnit.net 00:00:00.45] Catastrophic failure: System.ArgumentException : There is at least one object in this array that cannot be serialized (Parameter 'array')
[xUnit.net 00:00:00.45]     [FATAL ERROR] System.ArgumentException
[xUnit.net 00:00:00.45] Catastrophic failure: System.ArgumentException : There is at least one object in this array that cannot be serialized (Parameter 'array')
[xUnit.net 00:00:00.45]     [FATAL ERROR] System.ArgumentException
[xUnit.net 00:00:00.45] Catastrophic failure: System.ArgumentException : There is at least one object in this array that cannot be serialized (Parameter 'array')
[xUnit.net 00:00:00.46]     [FATAL ERROR] System.ArgumentException
[xUnit.net 00:00:00.46] Catastrophic failure: System.ArgumentException : There is at least one object in this array that cannot be serialized (Parameter 'array')

It doesn't even include the line where it failed so I have no idea how to fix it.
Was this page helpful?