This is what I did to reproduce this problem:
1. Changed a signature (with R#) of an interface method to have an additional int parameter, and told R# to place "TODO"s in the existing calls. There are 6 implementations of that interface and one call of that method (so 6+1 files R# needs to update automatically due to the signature change).
2. There was only one call/TODO to fix, which I did.
3. The code now compiles, but NCrunch reports a build failure for that project, with errors like:
Code:
XXX.cs (9, 18): 'XXX' does not implement interface member 'YYY'
... where YYY is the interface method I changed signature of and XXX are the 6 implementation classes of that interface.
Remco;9950 wrote:
After you've performed this refactoring, then fixed up the TODOs, can you describe in detail the state of the engine and how it is desynchronised? Something you can do is to look at the generated source files in the NCrunch workspace and compare these with your foreground source files, then see what's different. You can access the source files in the NCrunch workspace by right clicking on a project in the Tests Window and choosing Advanced->Browse to workspace.
EDIT: I also just wanted to add that of particular relevance is whether the source files changed by the refactoring are open in the IDE. This is quite important because otherwise they are treated as a file system change by NCrunch, which has different handling.
I checked the source code in the NCrunch workspace, as you suggested. The interface YYY file was updated (with the new
int parameter), but the 6 implementation (XXX) classes was not. It's also clearly visible that the Date modified time of interface file YYY was 6 minutes after that of 6 XXX files, so I guess NCrunch somehow did not pick up the changes in the XXX.
When I do a reload of the failing project in NCrunch Tests windows, everything is fine.
When I repeated this same procedure a couple of times on the same code, NCrunch worked (detected all changes) without problems. So it's an intermittent thing.