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

Notification

Icon
Error

2 Pages<12
xunit v3, missing xunit.v3.runner.inproc.console net6.0?
mgrundner
#21 Posted : Tuesday, April 15, 2025 8:22:45 AM(UTC)
Rank: Member

Groups: Registered
Joined: 2/25/2016(UTC)
Posts: 22
Location: Austria

Thanks: 6 times
Was thanked: 4 time(s) in 3 post(s)
Hi Remco!

I have the same issue.

I've got a testing utils library that got


<PackageReference Include="Verify.XunitV3" Version="29.2.0" />

which has a transient dependency on.

<PackageReference Include="xunit.v3.extensibility.core" Version="2.0.1" />

Basically all projects that include xunit.v3.extensibility.core and are intendent to be util libs are failing.


Even if i mark the testing utils lib with <IsTestProject>false</IsTestProject> NCrunch complains:



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\mgrun\.nuget\packages\xunit.v3.runner.inproc.console\2.0.1\lib\net6.0\xunit.v3.runner.inproc.console.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.

my test projects are multitargeted to net8.0;net9.0

I've tried NCrunch_VS2022_5.13.0.1.msi and NCrunch_VS2022_5.13.0.4.msi

Do you need a small repo?

Regards, Manuel
mgrundner
#22 Posted : Tuesday, April 15, 2025 8:41:26 AM(UTC)
Rank: Member

Groups: Registered
Joined: 2/25/2016(UTC)
Posts: 22
Location: Austria

Thanks: 6 times
Was thanked: 4 time(s) in 3 post(s)
As a workaround i currently do:


<!-- TODO: Remove this after NCrunch solved: -->
<PropertyGroup Label="https://forum.ncrunch.net/yaf_postst3559_xunit-v3--missing-xunit-v3-runner-inproc-console-net6-0.aspx">
<OutputType>Exe</OutputType>
<UseApphost>true</UseApphost>
</PropertyGroup>

<!-- TODO: Remove this after NCrunch solved: -->
<ItemGroup Label="https://forum.ncrunch.net/yaf_postst3559_xunit-v3--missing-xunit-v3-runner-inproc-console-net6-0.aspx" >
<PackageReference Include="xunit.v3.core" />
</ItemGroup>

in my util projects.

This works fine in ncrunch and from the command line. I currenlty don't care that the utility libs are outputed as exe's

Remco
#24 Posted : Tuesday, April 15, 2025 9:20:08 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 991 times
Was thanked: 1333 time(s) in 1236 post(s)
Hi, you can just turn off the xunit3 adapter for this project in your NCrunch configuration.

Set 'XUnit v3+ Enabled' to False.
1 user thanked Remco for this useful post.
mgrundner on 4/16/2025(UTC)
mgrundner
#25 Posted : Wednesday, April 16, 2025 6:55:37 AM(UTC)
Rank: Member

Groups: Registered
Joined: 2/25/2016(UTC)
Posts: 22
Location: Austria

Thanks: 6 times
Was thanked: 4 time(s) in 3 post(s)
Remco;18048 wrote:
Hi, you can just turn off the xunit3 adapter for this project in your NCrunch configuration.

Set 'XUnit v3+ Enabled' to False.


Thanks! This works but I get a rather missleading warning running the tests in ncrunch, nothing to worry but cosmetic

WARNING - c:\program files\microsoft visual studio\2022\community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets: MSB9008: The referenced project ..\..\src\Vertiq.Testing\Vertiq.Testing.csproj does not exist.

Remco
#26 Posted : Wednesday, April 16, 2025 6:58:03 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 991 times
Was thanked: 1333 time(s) in 1236 post(s)
mgrundner;18050 wrote:

Thanks! This works but I get a rather missleading warning running the tests in ncrunch, nothing to worry but cosmetic

WARNING - c:\program files\microsoft visual studio\2022\community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets: MSB9008: The referenced project ..\..\src\Vertiq.Testing\Vertiq.Testing.csproj does not exist.


This warning isn't originating from NCrunch. It's something in the build system, probably benign. I would suggest ignoring it.
1 user thanked Remco for this useful post.
mgrundner on 4/16/2025(UTC)
mgrundner
#27 Posted : Wednesday, April 16, 2025 6:59:52 AM(UTC)
Rank: Member

Groups: Registered
Joined: 2/25/2016(UTC)
Posts: 22
Location: Austria

Thanks: 6 times
Was thanked: 4 time(s) in 3 post(s)
Remco;18051 wrote:
mgrundner;18050 wrote:

Thanks! This works but I get a rather missleading warning running the tests in ncrunch, nothing to worry but cosmetic

WARNING - c:\program files\microsoft visual studio\2022\community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets: MSB9008: The referenced project ..\..\src\Vertiq.Testing\Vertiq.Testing.csproj does not exist.


This warning isn't originating from NCrunch. It's something in the build system, probably benign. I would suggest ignoring it.


You are totally right, just rolled back and still got the warning.

Thanks Remco!
mgrundner
#28 Posted : Wednesday, April 16, 2025 7:35:30 AM(UTC)
Rank: Member

Groups: Registered
Joined: 2/25/2016(UTC)
Posts: 22
Location: Austria

Thanks: 6 times
Was thanked: 4 time(s) in 3 post(s)
The warning is when you reference a project in a directory.build.prop file, it builds fine. switched to normal project references directly in the csproj, then the warning goes away (if somebody gets the same issue)
1 user thanked mgrundner for this useful post.
Remco on 4/16/2025(UTC)
DCasado
#23 Posted : Thursday, July 3, 2025 9:32:00 PM(UTC)
Rank: Member

Groups: Registered
Joined: 10/2/2024(UTC)
Posts: 28

Thanks: 3 times
Was thanked: 2 time(s) in 2 post(s)
Hi, today I run into the same problem. The only thing that currently is helping is:


mgrundner;18047 wrote:
As a workaround i currently do:


<!-- TODO: Remove this after NCrunch solved: -->
<PropertyGroup Label="https://forum.ncrunch.net/yaf_postst3559_xunit-v3--missing-xunit-v3-runner-inproc-console-net6-0.aspx">
<OutputType>Exe</OutputType>
<UseApphost>true</UseApphost>
</PropertyGroup>

<!-- TODO: Remove this after NCrunch solved: -->
<ItemGroup Label="https://forum.ncrunch.net/yaf_postst3559_xunit-v3--missing-xunit-v3-runner-inproc-console-net6-0.aspx" >
<PackageReference Include="xunit.v3.core" />
</ItemGroup>

in my util projects.

This works fine in ncrunch and from the command line. I currenlty don't care that the utility libs are outputed as exe's




Is this still an existing issue?
BTW: I can run all tests with VS Test Explorer.

NCrunch version: 5.15.0.4
Xunit: 2.0.3
xunit.runner.visualstudio: 3.1.1
Remco
#29 Posted : Thursday, July 3, 2025 11:37:32 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 991 times
Was thanked: 1333 time(s) in 1236 post(s)
As far as I'm aware, any widespread issues of this sort have been resolved in the later builds of NCrunch.

With that said, it's quite possible that certain build configurations can still give dependency errors around Xunit3. Can you share more detail around the project you're experiencing problems with? Does this project contain Xunit tests? Can you copy/paste the error?
DCasado
#30 Posted : Monday, July 7, 2025 7:08:43 AM(UTC)
Rank: Member

Groups: Registered
Joined: 10/2/2024(UTC)
Posts: 28

Thanks: 3 times
Was thanked: 2 time(s) in 2 post(s)
This is the error from the UI:

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: D:\.cache\nuget\xunit.v3.runner.inproc.console\2.0.3\lib\net6.0\xunit.v3.runner.inproc.console.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.



I submitted also a Bug Report to you.


I have this issue with two projects (helper libraries). They doesn't contain any unit tests, only some mocks and base classes for our unit tests.
DCasado
#31 Posted : Monday, July 7, 2025 8:08:36 AM(UTC)
Rank: Member

Groups: Registered
Joined: 10/2/2024(UTC)
Posts: 28

Thanks: 3 times
Was thanked: 2 time(s) in 2 post(s)
Just to mention: It also helps to include a direct package reference to my two projects..


Code:

<ItemGroup>
	<PackageReference Include="xunit.v3.runner.inproc.console" />
</ItemGroup>
DCasado
#32 Posted : Monday, July 7, 2025 8:59:22 AM(UTC)
Rank: Member

Groups: Registered
Joined: 10/2/2024(UTC)
Posts: 28

Thanks: 3 times
Was thanked: 2 time(s) in 2 post(s)
I was able to reproduce this in a small repro:

https://github.com/IT-CASADO/ncrunch-issue-01

The problem is related to the following project setting:

Code:

<UseArtifactsOutput>true</UseArtifactsOutput>
Remco
#33 Posted : Monday, July 7, 2025 9:25:27 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 991 times
Was thanked: 1333 time(s) in 1236 post(s)
Thanks for narrowing this down. It looks like this problem is caused by xunit switching to net8, so the path has changed. I'll see about implementing a fix.
1 user thanked Remco for this useful post.
DCasado on 7/8/2025(UTC)
Remco
#34 Posted : Tuesday, July 8, 2025 12:01:10 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 991 times
Was thanked: 1333 time(s) in 1236 post(s)
DCasado
#35 Posted : Tuesday, July 8, 2025 5:52:55 AM(UTC)
Rank: Member

Groups: Registered
Joined: 10/2/2024(UTC)
Posts: 28

Thanks: 3 times
Was thanked: 2 time(s) in 2 post(s)
I can confirm that your fix is working on my side.

Many thanks for the quick support!
1 user thanked DCasado for this useful post.
Remco on 7/9/2025(UTC)
Users browsing this topic
Guest
2 Pages<12
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.065 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download