Question Details

No question body available.

Tags

c# xunit.net dotnet-test microsoft.testing.platform

Answers (1)

Accepted Answer Available
Accepted Answer
April 21, 2025 Score: 1 Rep: 1,522,543 Quality: High Completeness: 70%

I haven't looked into just --filter, but I believe the filtering with --filter-query is working. Microsoft.Testing.Platform fails by default if an entire assembly ends up running no tests. You can ignore that by adding a property (as discovered here):


  $(TestingPlatformCommandLineArguments) --ignore-exit-code 8

With this in place, using --filter-query works fine.

Exit code 8 is specifically "the test session ran zero tests", as documented in the list of error codes.