As I'm working on several topics in parallel, and reviewing a lot of Pull requests, I'm switching between branches a lot.
The issue is that very often, when I switch branch, NCrunch displays a lot of build errors, and rebuilding projects keep displaying the same errors.
Even when the Visual Studio (2022, v17.5, but all previous version did the same) builds properly the solution.
Usually, caused by some method or property not defined, and as soon as you open the file that defines that property or method, the error disappears.
I guess this is caused by some kind of cache on NCrunch side, that refreshes when you open the file.
Another "quick" way to fix the build is to restart the engine.
The issue is that I cannot trust NCrunch when I switch branch, because I also had the issue in the other direction : running tests on outdated code, and not detecting issues.
So I need to restart the engine everytime I switch branch, which is time consuming and error prone.
This is really annoying, and slows the adoption in our company, as this is the main complain I see.
This is not a new issue, I feel that I had it since day one (~18 months ago).
So please, make sure that the code used when building / running tests after a git checkout is always up-to-date (I'm using the VS to switch branch, if that matters).
Note that I'm always using the latest versions of everything (VS, NCrunch, nugets), the project is a solution with 30 projects (half Web API + libs, other half are test projects) in .NET 7 (we also had the issue when it was in .NET 6).