How do I run xUnit tests targeting the new .NET Core * .csproj in Teamcity?

I tried this with xUnit test runner 2 (actually 1.1.3 ). Unfortunately it does not support .NET Core and only works with full .NET 4.5:

tl2eN.png

Thus, the TC agent cannot run tests. I checked the docs and found it was out of date. I asked the official xUnit Slack server - no feedback thanks to @naile.

netcoreapp1.1 is used as the sole target framework for the project. Additional Information:

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

      

+3


source to share


1 answer


We are running xUnit tests against a csproj based dot core in TeamCity. This is no different than running them on your local machine (outside of Visual Studio). Use dotnet test runner like:

dotnet test project.csproj



I use this for projects targeting netcoreapp1.1 and net46

+5


source







All Articles