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
#23 Posted : Tuesday, April 15, 2025 9:20:08 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 979 times
Was thanked: 1316 time(s) in 1221 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
#24 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
#25 Posted : Wednesday, April 16, 2025 6:58:03 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 979 times
Was thanked: 1316 time(s) in 1221 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
#26 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
#27 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)
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.043 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download