Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Problem with latest xUnit v3 (3.2.0)
Argamon
#1 Posted : Tuesday, November 4, 2025 1:31:32 PM(UTC)
Rank: Member

Groups: Registered
Joined: 12/4/2018(UTC)
Posts: 17
Location: Germany

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
While upgrading to latest versions I experienced a problem with the latest xUnit v3 version.

(I am using the latest NCrunch version with VS2022, if it matters)

To reproduce, just create a new Console Application. add a xunit.v3 as dependency and replace the Program.cs with an example test.

When I run this, I get the test results.

After enabling NCrunch I get an error while building:
Code:
An error occurred while analysing this project after it was built: Unable to resolve an assembly required for the execution of Xunit3 on this machine.  The assembly was expected at the following path: C:\Users\myuser\.nuget\packages\xunit.v3.core\3.2.0\_content\runners\netcore\xunit.v3.runner.utility.netcore.dll
Please ensure the package containing this assembly is installed on your machine.  If you introduce an assembly reference directly to this binary in your test project, NCrunch will resolve it directly using your specified path.


PS.: After downgrading to xunit v3 3.1.0 it works. So there is definitly a change breaking NCrunch in this latest release
Remco
#2 Posted : Tuesday, November 4, 2025 11:35:57 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,407

Thanks: 1004 times
Was thanked: 1346 time(s) in 1249 post(s)
Thanks for letting me know about this. I've reproduced the problem as you've described. It looks like the binary was moved in xunit v3.2 as part of their MTP support changes. I'll see about introducing a fix for this on NCrunch's side. Note that if you reference the xunit assemblies directly, you can by-pass NCrunch's search logic and thereby instruct NCrunch on where to find the files yourself. Or you can just stay on Xunit v3.1 until I can organise a fixed build.
Argamon
#3 Posted : Wednesday, November 5, 2025 7:29:51 AM(UTC)
Rank: Member

Groups: Registered
Joined: 12/4/2018(UTC)
Posts: 17
Location: Germany

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Actually it was meant as a just hint that there is a problem with the latest version. As it was released this Sunday, I do not expect a fix asap ;)

I like to keep my software up to date, but this is not the first time a NuGet package update introduces problems. We will stick to 3.1.0 for now, there is no urge to rush to the new release.

The new way to create constructor arguments looks quite interesting. With the older releases you have to create your own TestFramework and subcluss a hell of xunit classes. But it will take weeks until I have some production ready code.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.029 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download