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
Remco 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.
mgrundner 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.
mgrundner 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.
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)
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?
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.
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.