Skip to content

UI test session on .NET 8 exits before the first test with an Activity type mismatch #141

Closed

Description

@Nice3point

Steps to reproduce

  1. Run a RevitApiUiTest session with Nice3point.TUnit.Revit 2025.1.10 and TUnit 1.78.0 in Revit 2025 on .NET 8.
  2. Include System.Diagnostics.DiagnosticSource 10.0 in the test output through Microsoft.Extensions packages.
  3. Start the test session inside Revit.

✔️ Expected Behavior

The session starts and executes the registered tests.

❌ Actual Behavior

The session exits with code 10 before its first test.
TUnit.Engine throws MissingMethodException for System.Diagnostics.Activity TUnit.Core.Context.get_Activity().

TUnit.Core remains in the default context with DiagnosticSource 8.0.
TUnit.Engine loads into a separate context with DiagnosticSource 10.0.
The two contexts resolve different Activity types.

Activity

  1. added
    bug 🐛An unexpected issue that highlights incorrect behavior
    executors 🎬Revit thread executors and the test lifecycle
    on Nov 2, 2026
  2. self-assigned this
    on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug 🐛An unexpected issue that highlights incorrect behaviorexecutors 🎬Revit thread executors and the test lifecycle

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions