Thanks for sharing these extra details.
I've reproduced the problem exactly as you've described it. It seems that 5 days ago there was an update to Xunit that added in an extra build step including this check, which by default will always fail under NCrunch. So it seems that we're broken at the moment.
I'm working on getting a build out containing a fix for this. Meanwhile, there are a couple of ways you can work around the problem:
1. Dropping back to the previous version of Xunit v3 should work just fine
or
2. Under the NCrunch 'Custom build properties' project-level configuration setting, try adding a build property that sets 'UseAppHost' = 'true'. This will allow the new check in Xunit to pass.
By default, NCrunch forces UseAppHost=false because this property adds significant complexity to the build system. The app host build steps are responsible for setting up an entire hosting environment for the project being built (including generated .exe stubs and everything). This also introduces extra package dependencies late in the cycle that can cause synchronisation problems with grid nodes when using distributed processing. It's also not normally needed when working with NCrunch, because NCrunch itself sets up the environment when it runs the tests. This check would have been added to Xunit because when Xunit is being run outside of NCrunch, it uses the apphost itself to build the test environment. However, at build time, the check is still applied to everything, so NCrunch is still hit by it.
The fix I'm working on will simply suppress the check so that things can continue as normal. I'll let you know when it's available.
Quote:
What if my team want to use the new plateform in the CI, but at the same time I want to still be able to open Visual Studio and have NCrunch working out of the box?
Nothing in NCrunch will prevent you from doing this. However, note that you will need to design your tests in a way that will work with both runners. Because it's more feature-rich, NCrunch is more constrained than other runners, so it's possible to design tests that might run without problems using a different runner but may fail under NCrunch (see the 'considerations and constraints' in the NCrunch documentation). Likewise, if you use any of the features in NCrunch's
runtime framework, these won't be available when using other runners, which could cause tests to fail there.
Most of the time it won't be a problem, it's just worth being aware of.