© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
2 replies
Miguel

Catastrophic failure while running xunit tests

When I run
dotnet test
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')
[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.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ xUnit tests
C#CC# / help
3y ago
❔ xUnit - totally isolated serial parameterized tests?
C#CC# / help
3y ago
[ASP.NET CORE MVC] XUnit tests not running in test explorer
C#CC# / help
3y ago
✅ Xunit v3 running test cases in parallel
C#CC# / help
4mo ago