DHirani;15892 wrote:Thank you for the above information which does resolve the issue. Just one question I have is when you switch InstrumentOutputAssembly to false then I lose all the code coverage which sort of defeats the object of using NCrunch for me, is there any plans to improve the performance when InstrumentOutputAssembly is set to true?
Unfortunately, this is the trade-off. It isn't possible to obtain code coverage data without instrumenting the code, and it isn't possible to instrument the code without impacting its performance.
A possible middle-ground is to turn off the 'Analyse line execution times' setting, which will simplify the instrumentation so that it only marks the covered lines of code without tracking their execution times.
Generally the best approach is to use the coverage suppression comments to deactivate the instrumentation in areas of the code that are performance critical. In this way, you can usually resolve the performance problems while still having the value of the coverage tracking on the rest of the codebase.