gpt4 book ai didi

macos - 在 OSX 上运行 xunit.console.runner

转载 作者:行者123 更新时间:2023-12-01 04:49:30 25 4
gpt4 key购买 nike

对可移植类库(用于 xamarin 表单项目)进行 xunit 测试。我在 Visual Studio 中运行 xunit 测试并在 Windows 上使用 xunit.runner.console,它们可以工作。

我在 OSX 下尝试同样的方法,我得到了这个:

mono xunit.runner.console.2.2.0/tools/xunit.console.exe bin/Debug/AppTests.dll -nunit reports/xunit_reports.xml
xUnit.net Console Runner (32-bit .NET 4.0.30319.42000)
System.IO.FileNotFoundException: Could not load file or assembly 'AppTests' or one of its dependencies

现在 bin/DebugAppTests.dll 存在。

我可以以某种方式找出运行者找不到的依赖项吗?或者有没有其他方法可以从命令行在 osx 上运行 xunit 测试?

最佳答案

相反,xunit runner 使用 dotnet
https://xunit.github.io/docs/getting-started/netcore/cmdline

dotnet test PATH_TO_TEST_PROJECT.csproj

我用 dotnet 2.1.301 检查过

关于macos - 在 OSX 上运行 xunit.console.runner,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42596997/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com