Does xUnitRevit support Revit 2025 API or .Net 8 upgrade?

Hi All,

Thank you for stopping by and reading my post. I am a newbie in this community so please let me know if I miss anything. Nice to meet you all!

I’ve been researching to use xUnitRevit for my Revit plugins. As we know that the Revit 2025 API requires the .net 8 upgraded plugins, my question is if the xUnitRevit framework supports it or not?

Hope you all have a nice day!

It has not been revised nor tested to work with 2025.

We multi-version release xUnitRevit and both the runner and utils projects for all versions up to 2024 are targeting Net4.8. All also rely on the Speckle.Revit.API nuget we publish, which would include the relevant Revit dlls.

That said, if you clone the repo, copy a new 2025 directory for the two components, change the target framework and add dependency references to your local Revit dlls you are welcome to try, test, confirm and contribute.

All PRs are welcome!!!

1 Like

Hi Team,

As your contribution guides, I created a request in the repo for this matter. Thank you.

Hi Jonathon,

I have used xUnitRevit on older (speckle+revit) projects, and found it very useful, thank you :slight_smile: For these and new projects I now have to support Revit2025.

I tried what you suggested: forked the project to investigate.

Just thought I would share my effort:


Added a “xUnitRevitRunner2025” and “xUnitRevitUtils2025” project and a “quick fix” copy of the “speckle.xunit.runner.wpf” files (so I don’t have to figure out how to setup a shared project for different target frameworks or use conditional project sdk like I normally do) and based them both on the net8.0-windows target framework to see if it would work on a test assembly build against it.

After a few small tweaks the gui addin works in Revit 20205 but, it couldn’t load/discover a “.net8.0(-windows) xUnitRevit test assembly”, A file not found exception, and a PlatformNotSupported hidden in the stack. I believe that xunit.runner.utility (even the latest version 2.9.2) does not support .net8.0.

Here is a link to a discussion I found helpful to figure what is supported: Documentation clarification: Console runner vs MSBuild runner ? · xunit/xunit · Discussion #2702 · GitHub

xUnit supports running tests in .net6.0+ by using the “dotnet test” wrapper/front end which uses “xunit.runner.visualstudio” package (which uses xunit.v3.runner.utility) to enable this.

To run the .net8.0 tests inside of the Revit AppDomain, my best guess would be to figure out how to use the (still in beta) v3 runner, similar to how it is used now with xunit.runner.utility and the AssemblyRunner2 class:

  • xunit.v3.runner.console (example of how to use the xunit.v3.runner.utility)
  • xunit.v3.runner.utility

I will let it rest a bit, if even possible this would require knowledge and time I do not have right now.

If you have the time, just let me know your thoughts: Are you using, or have future plans to use xUnitRevit for Speckle? Your focus should be on Speckle of course :+1: .

Indeed, we are totally focused on other areas right now with Next Gen Connectors - We are looking hard at our regression testing suit, and if xUnitRevit is compatible with NextGen development, then we may well pick this up again, but it is not an active project.