The doc says there is a bug in mono, but the PR was merged in 2015.
Actually I’m having errors using xunit 2.4.1 on mono and don’t know how to fix.
nuget restore LeetCode.csproj
nuget install xunit.runner.console
msbuild /p:Configuration=Debug
mono ./xunit.runner.console.2.4.1/tools/netcoreapp2.0/xunit.console.dll ./bin/Debug/netcoreapp2.1/LeetCode.dll
System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime.Loader, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
File name: 'System.Runtime.Loader, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime.Loader, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
File name: 'System.Runtime.Loader, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
mono ./xunit.runner.console.2.4.1/tools/net472/xunit.console.exe ./bin/Debug/netcoreapp2.1/LeetCode.dll
xUnit.net Console Runner v2.4.1 (64-bit Desktop .NET 4.7.2, runtime: 4.0.30319.42000)
System.InvalidOperationException: Unknown test framework: could not find xunit.dll (v1) or xunit.execution.*.dll (v2) in /root/TEST/bin/Debug/netcoreapp2.1