Skip to content

RevitUnit doesn't support TUnit 1.40 and higher #72

@BusHero

Description

@BusHero

Steps to reproduce

  1. Create a RevitUnit test project
  2. upgrade Nice3point.TUnit.Revit to 2025.1.0
  3. upgrade TUnit to 1.40

✔️ Expected Behavior

A test project using RevitUnit runs as expected

❌ Actual Behavior

Test project fails to run and throws the following exception:

C:\actions-runner\perdak\MEPOpeningMarker\MEPOpeningMarker\source\MEPOpeningMarker.Tests\bin\Release R25\MEPOpeningMarker.Tests.dll (net8.0-windows7.0) Zero tests ran
Exit code: -532462766
  Error output: Unhandled exception. System.TypeInitializationException: The type initializer for '<Module>' threw an exception.
   ---> System.TypeInitializationException: The type initializer for '<Module>' threw an exception.
   ---> System.TypeInitializationException: The type initializer for 'TUnit.Generated.TUnit_HookRegistration' threw an exception.
   ---> System.MissingFieldException: Field not found: 'TUnit.Core.Sources.BeforeTestSessionHooks'.
     at TUnit.Generated.TUnit_HookRegistration..cctor()
     --- End of inner exception stack trace ---
     at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type)
     at <TUnitInfrastructure_g>FD9E2CD6A00FB0531942AB65B62CB55394B2BB0977A7A5A83EBBCDD81DDBE7C20__TUnitInfrastructure.Initialize()
     at Nice3point_TUnit_Revit_Version_2025_1_0_0_Culture_neutral_PublicKeyToken_null_Nice3point_TUnit_Revit_ModuleInitializer()
     at .cctor()
     --- End of inner exception stack trace ---
     at <TUnitInfrastructure_g>FEBF077B0EFE0D16F5794DA2BC9F38020CA10E950A49FE789B164A64E6D1BFD7A__TUnitInfrastructure.Initialize()
     at .cctor()
     --- End of inner exception stack trace ---

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛An unexpected issue that highlights incorrect behaviorneeds triage 🔍Needs classification, prioritization, and assignment

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions