如何 运行 在 Teamcity 中针对新的 .NET Core *.csproj 进行 xUnit 测试?

How to run xUnit tests targeting new .NET Core *.csproj in Teamcity?

我用 xUnit test runner 2 (actually 1.1.3 试过了。不幸的是,它不支持 .NET Core,并且仅适用于完整的 .NET 4.5:

所以 TC 代理无法 运行 测试。我检查了 docs and found it to be outdated. I asked at official xUnit Slack server - 没有反馈 感谢@naile。

netcoreapp1.1作为唯一项目的目标框架。更多详情:

xUnit.net 2.2.0
Teamcity 10
VS2017
new *.csproj project format

我们 运行 xUnit 测试 TeamCity 中基于 csproj 的 dotnet 核心内容。这与 运行 在您的本地计算机(Visual Studio 之外)上安装它们没有什么不同。使用 dotnet 测试 运行ner,像这样:

dotnet test project.csproj

我将它用于针对 netcoreapp1.1 和 net46 的项目