After upgrading VS2022 to the latest version (17.14.0 Preview 3), NCrunch is unable to build the project. It's failing at the very first project down the dependency tree, with the following:
The type 'IMyType' in 'D:\NCrunchWorkspace\48952\5\shared\Domain\Commands\IMyType.cs' conflicts with the imported type 'IMyType' in 'Domain, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'D:\NCrunchWorkspace\48952\5\shared\Domain\Commands\IMyType.cs'.
The other dependent projects fail with:
System.Exception: An exception was thrown in the remote environment: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> nCrunch.Common.UserException: Errors occurred while trying to load the project file:
There is a circular dependency in the target dependency graph involving target "ResolveProjectReferences".
I tried to, with no success:
- change the sdk version configuration setting from 9.0.300.preview.0.25177.5 to 9.0.200
- clean NCrunch workspace
- clean NCrunch cache
Downgrading VS2022 to the previous preview version solves the issue.
I've managed to reproduce the problem as you've described it. The root cause is a change in the toolset that has broken NCrunch. It's actually quite a serious problem and I'm grateful that you took the time to report it.
Would you be interested in trying the build below to see if this solves the issue for you?
I just re-upgraded VS2022 to 17.14.0 Preview 3.0 and installed your NCrunch version above. I tested the example solution I uploaded above, and a more real life solution as well.
I can confirm it now works normally.
Side note: many thanks for your work on this tool, it's the greatest key to my productivity at work.