After switching to VS2017 and transitioning several of our full framework test projects to utilize the new project file format, our team has noticed that NCrunch is no longer displaying code coverage for several classes that are tested by NUnit TestCaseSources. It should also be noted that in these scenarios the entire class does not show coverage. We have some cases where the class is partially covered by TestCaseSources as well as regular tests. In these cases even the regular tests do not show coverage!
I've done a bit of investigating and I believe I've tracked down the steps to reproduce this issue. The steps to reproduce appear to be as follows:
1. Create a Netstandard 1.4 class library containing the class you want to test
2. Create a full framework (net461) test project using the new VS2017 csproj format
3. Create a set of tests using a TestCaseSource with a complex type as a parameter to the test*
* if the test does not have a complex type as a parameter coverage is shown correctly.
It seems that the issue is caused by the full framework test project being in the new csproj format. Some of our projects that haven't been converted to the new format are showing coverage correctly.
I've uploaded a sample repository to
https://github.com/Fasopus/NCrunchReproducedIssue