The arguments passed to dotnet test unconditionally include /noconsolelogger:
|
yield(CommandLineArgument("/noconsolelogger")) |
When that argument was first added, back in a7ff6840, it was guarded by a conditional and intended for MSBuild 15.0, and -noconsolelogger is still listed in the MSBuild docs. But we've found that when we port our unit tests to TUnit and want to invoke dotnet test with MTP using a dotnet step with command test then this argument aborts the testing:
Starting: .NET SDK 10.0.103 "C:\Program Files\dotnet\dotnet.exe" test --configuration Release --no-build @C:\TeamCity\buildAgent\temp\agentTmp\2.rsp --report-trx
15:49:58 in directory: C:\TeamCity\buildAgent\work\80a095a6e7c83ab8
15:49:59 C:\TeamCity\buildAgent\work\80a095a6e7c83ab8\tests\<elided>\bin\Release\net10.0\<elided>.dll (net10.0) Zero tests ran
15:49:59 Exit code: 5
15:49:59 Standard output: Tool '/noconsolelogger' not found in the list of registered tools.
15:49:59 Usage <elided>.exe [option providers] [extension option providers]
(snip the full list of supported arguments).
Our global.json is simply:
{
"test": {
"runner": "Microsoft.Testing.Platform"
}
}
It seems that the argument needs to regain a conditional guard so that it's only included when testing with MSBuild rather than dotnet test.
The arguments passed to
dotnet testunconditionally include/noconsolelogger:teamcity-dotnet-plugin/plugin-dotnet-agent/src/main/kotlin/jetbrains/buildServer/dotnet/commands/msbuild/MSBuildLoggerArgumentsProvider.kt
Line 23 in 9dca50d
When that argument was first added, back in a7ff6840, it was guarded by a conditional and intended for MSBuild 15.0, and
-noconsoleloggeris still listed in the MSBuild docs. But we've found that when we port our unit tests to TUnit and want to invokedotnet testwith MTP using adotnetstep with commandtestthen this argument aborts the testing:(snip the full list of supported arguments).
Our
global.jsonis simply:It seems that the argument needs to regain a conditional guard so that it's only included when testing with MSBuild rather than
dotnet test.