Thanks for clarifying this.
The problem you're encountering is caused by a lack of clarity between test discovery and test execution.
Theories like the one you've described are generated using data that is encountered during test discovery. Test discovery is a special step that is performed by NCrunch just after your assembly is built. In the case of Xunit2, this discovery is performed in a runtime domain that physically needs to execute your code in order to work out which tests exist in your project.
Because you've added code into the discovery step that is slow to execute, the discovery step will always be slow and ignoring the tests using NCrunch's configuration will have no effect on this. The discovery process itself is a necessary step and can't be skipped, and it isn't possible to selectively stop parts of it without editing the code. The reasons for this are twofold:
1. To be able to skip tests, we need to know that they exist. We can't know they exist until they are discovered.
2. Most of this process is actually handled by the test framework (Xunit2 in this case), so NCrunch has only limited control over it.
The best workaround for this is to use a compiler condition to strip the attributes from the code involved, so that the Xunit discovery system will simply pass over it. For example:
Code:
#if !NCrunch
[Theory]
[ClassData(typeof(TestDataSource))]
#endif
public void LargerThan1(int value)
{
Assert.True(value > 1);
}